Putting an attribute with the name of the block, in the block.

Joe Dunfee
edited May 2018 in 2D Drafting

When I search for info on this, I keep getting information about dynamic blocks, or data extraction.

I want to create a block, that has a label that has the block name shown. Of course, I could simply create a piece of text with the label. But, in this case, I will creating a large number of these blocks, each a different size, so I would prefer if I can find a way to have that name automatically defined. That way I can't make an error and accidentally put the wrong name (actually a sequence number) in. I can create attributes or fields that will show the length of a line, but of course, when I create the attribute, the block is not defined yet.

Any ideas?

-Joe

Comments

  • Since V16 fields can reference the BlockPlaceholder. But you are using V14 I believe.

  • I should have stated my version. Yes, I am v14.

    I am hoping to upgrade to the next version, when it comes out, if it implements the functions to create and use dynamic block. (or perhaps a similar functionality)

    -Joe Dunfee

  • Block name is a DXF code and a VBA property, so it shouldn't be too hard to make a custom command that creates a text entity inside the block, maybe at the block's insertion point, and uses the block's name as the text's contents.

    And you could incorporate that function into a custom version of the Block command, one that runs the built-in Block command first and then adds the block-name text to it, so that every time you create a block it automatically has its name visibly embedded.

  • Using the BlockPlaceholder EffectiveName as a field appears to work well (tested on v18) on an attribute of the block, time to upgrade!

This discussion has been closed.