Block position always Zero

Aug 6, 2015 at 7:15 AM
Hi Daniel,

Your library is great and has been really easy to use so far. I can import all the lines/polylines/etc. from the dxfDocument.

However, I now need to get the information about entities within Blocks. Every entry in Blocks has a Position of (0,0,0); this means that all entities in the block are placed on top of each other at (0,0,0) because I don't know how to offset them. Is there another variable somewhere that provides the position/offset of the Block?

Thanks very much,
Bobby
Coordinator
Aug 6, 2015 at 5:37 PM
That is perfectly normal, the block position defines the block's origin and usually there is no need to change it, and it is always better to keep it at (0,0,0). Remember, multiple instances of the same block might exist in the drawing and they are called inserts. An insert is a block reference, and the block its definition; therefore, to know the final placement of every entity defined in a block you need to transform them by the insert position, rotation, and normal. So, the information you seek it is defined in the insert not in the block.

Daniel