when i change visibilty one of the visibility is giving block reference name as "U99" when checking in debug mode. Are there any fix for this?
Solved! Go to Solution.
Solved by _gile. Go to Solution.
Hi,
This is the way dynamic blocks work. As soon as you edit some dynamic properties of a dynamic block reference, AutoCAD creates a new anonymous block definition (BlockTableRecord).
You can retrieve the name of the original block definition via the DynamicBlockTableRecord property of a block reference.
That is how dynamic block works. Workaround? If you really want to work around the block reference becoming anonymous block, then do not use dynamic block; or, only insert the block reference with its original dynamic properties and do not change them (then why use dynamic block at all?). You may want to explain why you have such a unusual requirement.
Norman Yuan
@kshitij_jadhav wrote:is there a workaround to avoid block name change
The workaround is to fix your application's design so that it does not rely on the names of anonymous blocks.
An app or plugin should never rely on the names of anonymous blocks, for the reasons described above, and because an anonymous dynamic block reference can be copied any number of times. When that happens, all of the copies reference the same anonymous dynamic block. When one of the copies is modified, it will reference another new anonymous block having a different name, while the other unmodified copies will still reference the previous anonymous block.
Describe your need for depending on anonymous block names, and perhaps someone can suggest a way to resolve it, but there is no workaround that can prevent an anonymous dynamic block's name from changing when the user modifies its properties.
Can't find what you're looking for? Ask the community or share your knowledge.