Create rectangle without loading file
Moderators: SDS, support, admin
Create rectangle without loading file
Hi,
I've come across an issue that I would like to solve.
I can load a .dxf file and then add a solid I created programmatically.
When I only want to load the programmatically created solid (or rectangle or whatever) I can't seem to get it working because the program obviously awaits a LoadedCADImage (like in the sample files).
Now the problem is that FDN.Picture.Graphic is nil because I never used "LoadFromFile('...').
How can I load my own TsgCADImage into the drawing Navigator without preloading a file?
I've come across an issue that I would like to solve.
I can load a .dxf file and then add a solid I created programmatically.
When I only want to load the programmatically created solid (or rectangle or whatever) I can't seem to get it working because the program obviously awaits a LoadedCADImage (like in the sample files).
Now the problem is that FDN.Picture.Graphic is nil because I never used "LoadFromFile('...').
How can I load my own TsgCADImage into the drawing Navigator without preloading a file?
Re: Create rectangle without loading file
Hello Mike,
It is possible to create a new TsgCADImage instance and load it into TsgDrawingNavigator using the code below:
Mikhail
It is possible to create a new TsgCADImage instance and load it into TsgDrawingNavigator using the code below:
Code: Select all
var
Img: TsgCADImage;
DNavigator: TsgDrawingNavigator;
...
Img := TsgCADImage.Create;
Img.Converter.InitializeSections;
Img.CurrentLayout := Img.Layouts[0];
DNavigator.Picture.Graphic := Img;
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support