.net dxf Anonymous block

Sep 17, 2014 at 8:20 AM
Hello,

I started with library .netdxf and I want to know how to find the effectivename of an anonymous block?

thank you for your help
Coordinator
Sep 18, 2014 at 5:15 PM
Edited Sep 18, 2014 at 5:53 PM
All blocks store their names in the Name property.

AutoCad internal blocks names start with *, which is an invalid character for user defined blocks, this includes the model space and the paper spaces blocks, and also anonymous blocks like the blocks generated by dimension entities that starts with *D followed by a number. In dxf version prior to AutoCad2000 the internal model space and the paper spaces blocks names started with $, also the hatch entities generated anonymous blocks that started with *A plus a number, in more recent version hatches are defined without the need of anonymous blocks.

The Block class has a property called Flags, at the moment is internal, that stores the block type flags, You can change property to public if you need to check if the block is anonymous, also you will need to make public the enum BlockTypeFlags.

Daniel
Oct 7, 2014 at 7:31 AM
Hello,
thank you for your reply.
However, when I search the name of a dynamic block , I get his name (* U ... ) while I will wish the name of the original block . From what I've seen, it's a Xdata ( Code 1001 I think).
How to proceed?

Thank you very much
Coordinator
Oct 9, 2014 at 6:13 PM
Imagine that you have a block with parameters, actions, and constrains. When you insert this block in the drawing it will point to it; but if, at any moment, you modified any of its parameters a new anonymous block definition will be created with the name *U#, where # is a positive integer. Additionally, the block record of the anonymous block stores the handle of the original record in its extended data information, but at this moment netDxf reads this but does not make it public.

In the next update I will give you access to the block record extended data, and I will add a sample on how all this works. In any case if you try to load a block with dynamic parameters with netDxf you will loose the parameters, actions, and constrains information.

Daniel
Oct 15, 2014 at 5:46 AM
Ok, thank you.