Hi,
IÒ‘m testing your CadImage.dll Demo program that iÒ‘ve downloaded from your website (http://www.cadsofttools.com/download/cadimage.zip). Im developing in Delphi so iÒ‘ve picked the DemoDelphi projekt. Loading DXF-files works fine. How can I modify it, so I can save the DXF as Bitmap, JPEG and/or GIF like in the other Demos?
DemoDelphi DXF Export
Moderators: SDS, support, admin
Hi Alran,
We will have made respective changes to the demo soon. Until that we would like you to pay attention on the other product: <b>CADImportVCL</b>. It is available on: http://www.cadsofttools.com/download/cadimportvcl.zip This library is much more powerful and convenient in usage.
Generally saying it is necessary to use the following functions:
Sergey.
please post questions to the forum or write to support@cadsofttools.com
We will have made respective changes to the demo soon. Until that we would like you to pay attention on the other product: <b>CADImportVCL</b>. It is available on: http://www.cadsofttools.com/download/cadimportvcl.zip This library is much more powerful and convenient in usage.
Generally saying it is necessary to use the following functions:
Code: Select all
BOOL SaveCADtoBitmap(
<font color="blue">HANDLE</font id="blue"> <b>hObject</b>,
<font color="blue">LPCADDRAW</font id="blue"> <b>lpcd</b>,
<font color="blue">LPCSTR</font id="blue"> <b>lpFileName</b>
);
BOOL SaveCADtoJpeg(
<font color="blue">HANDLE</font id="blue"> <b>hObject</b>,
<font color="blue">LPCADDRAW</font id="blue"> <b>lpcd</b>,
<font color="blue">LPCSTR</font id="blue"> <b>lpFileName</b>
);
BOOL SaveCADtoGif(
<font color="blue">HANDLE</font id="blue"> <b>hObject</b>,
<font color="blue">LPCADDRAW</font id="blue"> <b>lpcd</b>,
<font color="blue">LPCSTR</font id="blue"> <b>lpFileName</b>
);
<b>Parameters</b>
<i>hObject</i>
Identifies a CAD drawing object handle.
<i>lpcd</i>
Points to CADDRAW structure containing the device context, logical coordinates, drawing format etc.
<i>lpFileName</i>
Points to a null-terminated string that specifies a file name with the respective extension (BMP, TIFF or JPEG)to which currently displayed layout will be saved.
please post questions to the forum or write to support@cadsofttools.com
I think I have found the 3 required functions of the dll in the VBDemo:
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Any) As Long
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
But how must they look like in Delphi?
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Any) As Long
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
But how must they look like in Delphi?
Hello Alran;
We have added to the Delphi Demo respective functionality which allows saving opened CAD file to the BMP, JPEG or TIFF file formats. Please examine new procedure:
Updated <b>CADImageDLL</b> package is available on:
http://www.cadsofttools.com/download/cadimage.zip
Sergey.
please post questions to the forum or write to support@cadsofttools.com
We have added to the Delphi Demo respective functionality which allows saving opened CAD file to the BMP, JPEG or TIFF file formats. Please examine new procedure:
Code: Select all
<b>procedure</b> TfmMain.miSaveAsClick(Sender: TObject);
http://www.cadsofttools.com/download/cadimage.zip
Sergey.
please post questions to the forum or write to support@cadsofttools.com