Specifications for Formula Linked to IDs Embedded in User Text

Hello,

I would like to confirm whether the behavior I’m currently experiencing in my environment is intended or a bug.

To dynamically display the area of any surface in a Text field, I’ve embedded Area(id) into the TextField. This works correctly.

Next, when I embed Area(id) into a Surface’s UserText, the area is displayed correctly in the UserText.

Here’s my question: I tried embedding Area(id)—which takes the Surface’s ID as input—into a Text object’s UserText. It works correctly immediately after entering the ID, but…

However, if I switch the UserText panel to a different panel and then bring it back, the Area(id) entered in the UserText is no longer the Surface’s ID; instead, it’s automatically replaced with the ID of the Text object’s own UserText.

The Surface ID entered in the Text object’s TextField does not change on its own, but when embedded in UserText, it is automatically replaced. Is this due to the specification that UserText can only reference itself?

If this is the specification, it means I cannot do this when I want to store the Surface’s area in the Text object’s UserText as information, even though I don’t want the area displayed in the Text itself.

This is not limited to Area(id). The same applies to other expressions, such as ObjectName(id), which are automatically replaced with the Text object’s own GUID.

My intention in embedding an expression in UserText is to track the GUID, rather than to determine which Surface the Text object is linked to by its Name or Area. I am unsure whether this automatic replacement with the object’s own ID is intended behavior or a bug, but I would like to see this improved.

thanks,

Hi Hiroaki -

Thanks, that looks like a bug to me.
RH-95882 TextField: GUID is Automatically Changed
-wim

RH-95882 is fixed in Rhino 8 Service Release 33 Release Candidate