Page 1 of 1
Copying Entities from one TDXFImage to Another TDXFImage
Posted: 19 Aug 2011, 16:41
by bilcan
Copying Entities from one TsgDXFImage to Another TsgDXFImage
Is there any way to do that?
Re: Copying Entities from one TDXFImage to Another TDXFImage
Posted: 22 Aug 2011, 12:35
by Mikhail Zhilin
Hello.
Such functionality is provided by the library. You can see Editor demo to figure out how it works. If you need code examples, just see TsgBlockLibrary.CopyAsBlock and TsgBlockLibrary.PasteAsBlock methods.
Best regards,
Mikhail Zhilin,
Soft Gold Ltd.
http://www.cadsofttools.com
Re: Copying Entities from one TDXFImage to Another TDXFImage
Posted: 22 Aug 2011, 15:18
by bilcan
I copied entities via following method but I Couldn't select the entities after paste?
for I := 0 to CopyList.Count-1 do
begin
vEnt := TsgDXFEntityClass(TsgDXFEntity(CopyList).ClassType).Create;
vEnt.AssignEntity(TsgDXFEntity(CopyList));
Img.Converter.OnCreate(vEnt);
Img.Converter.Sections[csEntities].AddEntity(vEnt);
Img.Converter.Loads(vEnt);
end;
Img.GetExtents;
FDNavigator.Picture.Graphic := Img;
FDNavigator.Color := Img.BackgroundColor;
//TsgCADImage(sgImage.Picture.Graphic).IsWithoutBorder := True;// without border
FDNavigator.FitToSize;
CopyList.Clear;
Re: Copying Entities from one TDXFImage to Another TDXFImage
Posted: 26 Aug 2011, 18:14
by Mikhail Zhilin
Please, describe how you paste entities after copying (with code snippet).
Mikhail Zhilin,
Soft Gold Ltd.
http://www.cadsofttools.com