Copying Entities from one TDXFImage to Another TDXFImage
Moderators: SDS, support, admin
Copying Entities from one TDXFImage to Another TDXFImage
Copying Entities from one TsgDXFImage to Another TsgDXFImage
Is there any way to do that?
Is there any way to do that?
-
- Posts: 39
- Joined: 04 Aug 2011, 11:31
- Location: Russia
Re: Copying Entities from one TDXFImage to Another TDXFImage
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
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
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;
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;
-
- Posts: 39
- Joined: 04 Aug 2011, 11:31
- Location: Russia
Re: Copying Entities from one TDXFImage to Another TDXFImage
Please, describe how you paste entities after copying (with code snippet).
Mikhail Zhilin,
Soft Gold Ltd.
http://www.cadsofttools.com
Mikhail Zhilin,
Soft Gold Ltd.
http://www.cadsofttools.com