Page 1 of 1

Issue on GetCADFile

Posted: 13 Dec 2012, 21:28
by Alexander
Hello Support Team,

I'm trying to load a DXF file containing a symbol and I'm using for that the method GetCADFile passing an existing file path. It's working with the demo library, with the licensed one it throws an exception in the GetCADFile method in CADImage.pas:

Here is the code: (except from CADImage.pas)
function GetCADFile(const AFileName: string): TsgCADImage;
var
vPicture: TPicture;
begin
Result := nil;
vPicture := TPicture.Create;
try
vPicture.LoadFromFile(AFileName);
if vPicture.Graphic is TsgCADImage then
begin
Result := TsgCADImageClass(vPicture.Graphic.ClassType).Create;
Result.Assign(vPicture.Graphic);
Result.IsWithoutBorder := True;
end;
finally
vPicture.Free;
end;
end;

The exception will be thrown on vPicture.LoadFromFile(AFileName) when using the licensed library.
Can you help please ?

Thanks,
Alexander

Re: Issue on GetCADFile

Posted: 18 Dec 2012, 18:11
by support
Hello.
Please let us know if problem appears when importing any DXF file or just some specific DXF file. Please specify the version number of used licensed library.

Alexander.

Re: Issue on GetCADFile

Posted: 19 Dec 2012, 22:43
by Alexander
Hi Alexander,

As I mentioned before I encountered the exception only with the licensed library and with all files: I used different small DXF files containing only a block.
I supose the version we use is 9.0; you provided us a Lib folder containing the PAS files (cadexportvcl_9.0).

The exception is thrown in the method vPicture.LoadFromFile(AFileName). With the demo library, this method will show the Demo-Warning.
Can it still be related to some non licensed components?

Thanks,
Alexander

Re: Issue on GetCADFile

Posted: 20 Dec 2012, 11:30
by support
Hello Alexander.
vPicture.LoadFromFile is the part of CAD Import VCL library. But it looks like from your post you have CAD Export VCL license. Export part of the library doesn't allow to import CAD files.

Alexander.