haplokuon / netDxf

.net dxf Reader-Writer
MIT License
981 stars 400 forks source link

Block in block Error #411

Closed sunrui19941128 closed 1 year ago

sunrui19941128 commented 1 year ago

ceshi4(1).zip Hello, I have a DXF file here. There is a polyline as a block and a circle as a block. These two blocks form a new block. After opening, the position is wrong, and the number of inserts printed out is only 1. The number of inserts seen in the DXF file is three

haplokuon commented 1 year ago

I do not see any problems. You have an Insert that references a block that contains two more inserts that references two other blocks. What you are building is a nested block a Parent-Childs tree structure. Only the parent Insert will appear at the document level, the other two belong to its parent and not to the document. You need to navigate through the tree structure to find them. Check the entities that belong to the block to go down the tree, and the insert`s owner to go up.

Why do you think that after opening the position is wrong? You might need to read #390.