Page 1 of 1

Importing CADInsert

Posted: 13 Sep 2016, 00:21
by rtec
HI,
How to import a specific insert from a CADImage.
I tried using selectedCadInsert.Converter.Iterate, but it is iterating through all the entities in the cadimage not just entities in the insert.

Thanks
Ravi

Re: Importing CADInsert

Posted: 16 Sep 2016, 20:30
by support
Hello Ravi,

CADInsert.Converter.Iterate method iterates through all the entities in the drawing, because CADInsert.Converter actually refers to the current CADImage.Converter. You can use foreach loop to iterate through the entities in a corresponding block. For example:

Code: Select all

using CADImport
...

CADEntityCollection entities = new CADEntityCollection();
foreach (CADEntity ent in selectedCadInsert.Block.Entities)
{
    entities.Add(ent);
}
Mikhail

Re: Importing CADInsert

Posted: 21 Sep 2016, 19:17
by rtec
so I need to manually do the rotation, scaling and offset to get exact location of each entity in the block and it gets little more complicated in case of multilevel inserts.

-Ravi