Show value of block attribute in field expression.

Show value of block attribute in field expression.

Anonymous
Not applicable
1,979 Views
2 Replies
Message 1 of 3

Show value of block attribute in field expression.

Anonymous
Not applicable

Dear community,

 

I have a block with several attributes. The attributes themselves are invisible, yet are supposed to be shown together inside an MText field expression as part of that block.

For example:

Attribute 1 of block A: 100 (Default: 0)

Attribute 2 of block A: 50 (Default: 0)

Desired field expression inside of MText inside of Block A: 100/50

Actually displayed field expression: 0/0

 

How to make sure the values inside of the field expression match the set attribute values?

I saw some similar problems that were solved via REA and ATTSYNC, but those don't do  anything in this case.

 

Kind regards

ZTG

0 Likes
Accepted solutions (1)
1,980 Views
2 Replies
Replies (2)
Message 2 of 3

user181
Mentor
Mentor

If regenall doesn't work then maybe you need to adjust the field update settings.  In OPTIONS go to the User Preferences tab and click on the Field Update Settings button. Then check regen and any other items in the dialog for automatic field updates. After that regenall and the other options chosen should update the fields.

EESignature


0 Likes
Message 3 of 3

steven-g
Mentor
Mentor
Accepted solution

This question comes up occasionally, and there are a few requirements to make it work.

First, the field has to be in an attribute mtext fields won't work.

Second, it has to be a dynamic block and it has to have a dynamic action applied (which 'triggers' the behavior).

Third, you need to regen to see changes.

Attached is an example to show the different parts. The good news is that once you have a block working you can copy it around or between drawings and it keeps on working without having to perform the dynamic action each time (that is only needed if you insert the block).

I used a visibility state as the dynamic action but it can be anything and it doesn't need to do anything special, this one just swaps the visibility state between 'off' and 'on'  which are just names I made up you can swap it back to off and the block still works.