DXF Export (VCL): Text Labels not in DXF
Moderators: SDS, support, admin
DXF Export (VCL): Text Labels not in DXF
Hello,
I am demoing CADSoftTools DXF Export for VCL with a Delphi 7 application that uses MapObjects LT 2.0. I use the MapObjects method, ExportMap2 to write the visible extent of a map to an enhanced metafile. I then pass this metafile to the DXF Export method, ExportToDXF with the XP_USE01MM flag. When I open the DXF which is created, none of the text labels on the map are appearing in the image. When I open the DXF in a text editor, a confirms that the map labels were not written to the file. Do you know of anything that could be causing the text to be missing?
The code:
Thanks,
erzsebet
I am demoing CADSoftTools DXF Export for VCL with a Delphi 7 application that uses MapObjects LT 2.0. I use the MapObjects method, ExportMap2 to write the visible extent of a map to an enhanced metafile. I then pass this metafile to the DXF Export method, ExportToDXF with the XP_USE01MM flag. When I open the DXF which is created, none of the text labels on the map are appearing in the image. When I open the DXF in a text editor, a confirms that the map labels were not written to the file. Do you know of anything that could be causing the text to be missing?
The code:
Code: Select all
function ExportToDXF(Hanlde: THandle; FileName: PChar; Flags: DWORD): Integer; stdcall; external 'C:\DXFExp.dll' name 'ExportToDXF';
procedure TMapPage.SaveClick(Sender: TObject);
var
DFXFile: string;
Path: string;
AMetaFile : TMetafile;
begin
if not Assigned(Map) then exit; // Map is an ESRI TMapLT object
if TMenuItem(Sender).Tag = 0 then begin
with TSaveDialog.Create(Self) do try
InitialDir := ShellDir('Personal');
DefaultExt := 'dfx';
Filter := 'DXF Files (*.dxf) | *.dxf';
Execute;
DFXFile := Filename;
finally Free end;
end;
if (Copy(DFXFile, Length(DFXFile)-3,4) = '.dxf') then begin
try
try
Map.ExportMap2(moExportEMF, DFXFile, 1, True);
AMetaFile := TMetafile.Create;
AMetaFile.Enhanced := True;
AMetaFile.LoadFromFile(DFXFile);
if (AMetaFile.HandleAllocated) then
ExportToDXF(AMetaFile.Handle, PChar(DFXFile), XP_USE01MM)
finally
AMetaFile.Free;
end;
except
on E : Exception do
ShowMessage('Error : ' + E.Message);
end;
end;
erzsebet
Re: DXF Export (VCL): Text Labels not in DXF
Hello.
Can you send us typical metffile with problem occured on support?
Anton
Can you send us typical metffile with problem occured on support?
Anton
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: DXF Export (VCL): Text Labels not in DXF
Anton, hi -
I just sent the file.
Thanks!
erzsebet
I just sent the file.
Thanks!
erzsebet
Re: DXF Export (VCL): Text Labels not in DXF
Hello!
Thank you for the files.
Your metafile does not contain text (TEMR.iType = EMR_SETWINDOWEXTEX). They are the raster images and can not export to DXF as text.
Best regards,
Anton
Thank you for the files.
Your metafile does not contain text (TEMR.iType = EMR_SETWINDOWEXTEX). They are the raster images and can not export to DXF as text.
Best regards,
Anton
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support