Issue on GetCADFile
Posted: 13 Dec 2012, 21:28
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
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