Add dxf to another as a block

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

Moderators: SDS, support, admin

Post Reply
hamedjim
Posts: 2
Joined: 01 Feb 2023, 10:56

Add dxf to another as a block

Post by hamedjim » 01 Feb 2023, 11:13

There are a number of dxf files that need to be added separately to the base dxf file as a block. Then each of these blocks may need to be moved, scaled, or angled.
any idea or some clues? Thanks.

hamedjim
Posts: 2
Joined: 01 Feb 2023, 10:56

Re: Add dxf to another as a block

Post by hamedjim » 05 Feb 2023, 11:02

Hello


My idea:
1. Using TsgCADdxfImage to open the main .dxf file and load to TImage (is that possible to zoom by this method?)
2. Using another TsgCADdxfImage to open sub .dxf files. Make them block (TsgDXFBlock) and add them to the main TsgCADdxfImage and TTreeView list.
3. Select from TTreeView (or select by clicking on the TImage!).
4. Get the block object by clicking on the TTreeView node or TImage.
5. Move, rotate, and scale the block.
6. Save the file.

Please approve or disapprove of my idea and give me a clue for each part. Thanks.

Hamed

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

Re: Add dxf to another as a block

Post by support » 07 Feb 2023, 10:05

hamedjim wrote:
01 Feb 2023, 11:13
There are a number of dxf files that need to be added separately to the base dxf file as a block. Then each of these blocks may need to be moved, scaled, or angled.
any idea or some clues? Thanks.
hamedjim wrote:
05 Feb 2023, 11:02
Hello


My idea:
1. Using TsgCADdxfImage to open the main .dxf file and load to TImage (is that possible to zoom by this method?)
2. Using another TsgCADdxfImage to open sub .dxf files. Make them block (TsgDXFBlock) and add them to the main TsgCADdxfImage and TTreeView list.
3. Select from TTreeView (or select by clicking on the TImage!).
4. Get the block object by clicking on the TTreeView node or TImage.
5. Move, rotate, and scale the block.
6. Save the file.

Please approve or disapprove of my idea and give me a clue for each part. Thanks.

Hamed
Hello Hamed,
Yes, you can open a file using TsgCADdxfImage, but it is better to use TsgDrawingNavigator, where file loading is implemented as well. Also, we have a possibility of adding an Insert as XRef to the main .dxf file.
You can have a look at how XRef adding is implemented in our demo at \Delphi\Demos\TextChange+Color2LineWeight+MergeFiles\TextChange_Color2LineWeight_MergeFiles.dproj.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply