How to copy a TsgDXFImage

Discuss and ask questions about CAD VCL (Delphi and C++ Builder).

Moderators: SDS, support, admin

Post Reply
gnl
Posts: 9
Joined: 05 Oct 2006, 23:40
Location: Greece

How to copy a TsgDXFImage

Post by gnl » 22 Nov 2006, 13:16

Dear Sergey,

I am trying to make a copy of an already loaded TsgDXFImage so that I can keep a snapshot of the drawing before the user has done any changes onto it ! I have used BaseImg.Assign(TsgDXFImage(sgPaintBox.Picture.Graphic)) but instead of making a copy of it, BaseImg refers to the original image, thus, when I try to revert to it, I get the changed image. I do not want to use the LoadFromFile method since the file is quite big and it takes some time to load it.

Thanks in advance
George

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 22 Nov 2006, 17:52

Hello George,

Thank you for the question.

<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">"BaseImg refers to the original image"<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
It is not exactly that. Reference is the same for Converter only. It means that you can change TsgDXFImage properties (background color, rotation, visibility of texts and dimensions etc.) but you can't change entities independently for different copies of TsgDXFImage class object. Using current version of CADImportVCL it is necessary to load CAD file several times in need to store several independent copies of TsgDXFImage class object. One of the reasons of this rule is a necessity to set inner references between objects of the loaded CAD file.

Sergey.

please post questions to the forum or write to support@cadsofttools.com

Post Reply