User Text does not update (expire) when attributes are changed

See this example:

I think it is very confusing when the User Text component does not automatically update with referenced geometry. In a complex definition, it takes a bit to figure out whether the attributes are not updated in Rhino or whether it is a User Text component that needs to ‘redraw’.

I know you can hotkey recompute, but this still gets me by suprise more often than I’d like to.

User Text not updating (expiring) with attribute changes.gh (11.8 KB)
Dynamic attributes push pull.3dm (63.8 KB)

Version 8 SR9
(8.9.24194.18121, 2024-07-12)

@Intuos This is where the pull content is useful:

image
User Text updating (expiring) with attribute changes.gh (18.6 KB)

2 Likes

When drafting something really quickly I often reference geometry by right clicking and set one geometry. I find it can be dangerous since when you delete the referenced curve, a week later you might not know what it was referenced to. I created a button in Rhino to retrieve the layer name of a selected object so I don’t have to type a layer name. This helps me avoid the right click, set procedure.

This also works:

@kike @AndyPayne are there plans to incorporate an event listener component? Ideally I want to listen to User Text Changes for a particular layer and certain Key/Value pairs to trigger a content cache pull (to update the downstream definition). This would allow me to have my script update as I change attributes, which is currently impossible.
I used to be able do do this in the Rhino 8 WIP and I miss this capability a lot, because it can basically be used to create loops while retaining full manual control (without using loops in Grasshopper).

Perhaps it could be as simple as a component that outputs a boolean true when you hit enter in User Text field, because that’s all I really need to trigger Content Cache.
afbeelding

I know I can hit recompute in Grasshopper or even use a redundant layer and use it’s visibility button as the means to have an update button, but this means I have to move my mouse away from the viewport for each update, same applies to using the recompute shortcut for Grasshopper.

E: From these two screen captures it is obvious that the synchronisation for the Query Model Objects is not always updating to User Text Attribute changes.


I’m not sure why, but it’s erratic:

Hi @Intuos,

V8.12 that will be released today should behave as you expect and expire on any object change, included user-text.

2 Likes

In a new file, it works as expected, which is great, thank you!
At the same time,I am still noticing issues in today’s WIP I have replaced the components in question, but they still aren’t referencing the new curves. Them updating at the end was because I have set my script to update when the number of curves changes between the list,which delete does:

@kike Found another case where the component is not updating/expiring correctly:


When I rename the User Text keys, the User Text component that references Rhino geometry doesn’t update to reflect the new keys, whereas the document does.
QMO expiring test.gh (12.8 KB)
QMO expiring test.3dm (44.7 KB)

On a sidenote, renaming keys appears to be a little odd, because the User Text component that is pushed to Rhino does not contain the old key names, yet they remain in Rhino. :thinking:

This should work on the latest public 8.12.
Please check you are on Rhino 8 SR12 2024-10-1 (Rhino 8, 8.12.24275.15001)

1 Like

This is because ‘User Text’ is in Ensure mode, it will ensure the specified keys are pushed, but will not delete any previous pushed key.

Ah, I see, I’m on Version 8 SR12 (8.12.24273.7001, 2024-09-29), which I got from a private message. It didn’t contain all your patches then. :slight_smile:
When I hit the update button, Rhino says I’m on the latest and so does the check now button :sweat_smile:
I’ll go get the Service Release Candidate.

Yes, I have the option to either not update values for a key - Ensure
Update values for a key - Update
Update values for a key - Merge
Remove Key/Value pairs - Replace/ Remove

But there’s no option to keep the values and replace the keys themselves.

To have such an option we would need the old key and the new key as an input.
Are you after a rename key component?

Exactly, that’s what I am after. Basically an Ensure but with renaming keys. If you look at my example file above, I would like to rename the keys in the yellow panels. Since I only set the names in Grasshopper, that would be ideal.

I’m afraid that manually removing/ replacing certain attribute keys for renaming can mess up my work if an unforseen tree structure emerges.

The synchronisation issue emerged again, could it be caused by opening the GH file from Rhino 9 (WIP) where the issue is not yet fixed?

Seems like the issue is fixed in Version 8 SR13 (8.13.24282.10001, 2024-10-08). Will be putting it through a more thorough test today.