AttributeUserText or Text fields inside a Block

How can I access the attribute user text options in a block?
I want to link text to a component in the layout so that it shows me the length of the component. Without converting the component to a block, I can access curves that lie on a volume. Once I convert it to a block, I can no longer select curves.

Does anyone have any experience with this?
THX

EXAMPLE.3dm (7.6 MB)

1 Like

When you add an object into a block definition, the id changes so you loose the connection in your formula.
Double click on the block to enter edit mode, add text with formula (selecting the object that you need), copy the object id and exit from the edit block.
Place the text on the layout and paste the formula in it (the object id and the length command in your example).
This is your file with new formula.
EXAMPLE.3dm (98.7 KB)

Btw, purge and save small before sending files on the forum so the file is a lot smaller.

Hi, and thanks for the quick reply. I couldn’t even figure out the object ID, but it makes sense.

Unfortunately, the problem is that the ID seems to change when scaling or extending the object in the block, and the reference is no longer correct. This doesn’t happen with the non-block object.

Thanks also for the tip about the file size.

the ID change when the object in the block is scaled does not make sense to me… might be a bug?
@wim

Blocks aren’t easy… they have to exist as a linked object that have it’s own “space” into the classic modeling space… so all the names, id, colors, layers are a little bit “out” from the normal wokspace.
Probably McNeel decided to reassign the ID inside the block definition each time you modify something, probably to avoid other problems with IDs from standard workspace.
For example, if you select a block istance and click on the details button you’ll see that it has it’s own ID as a standard object.
If you select the DimCurveLength command and sub-select a curve owned by a block istance, you’ll see that the fomula point to the Block Istance ID’s with a :XX,Y at the end (this is an address that point to the object inside the block).
If you double click on the block instance and select the curve (the one previously sub-selected) and click on details, you’ll see that the ID is another one.
So we can say that an object inside a block can be reached with different IDs.
When you edit a block, all this “addresses” have to be updated for all the instances inside your project.