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.
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.
@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.
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.
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.
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.
When I hit the update button, Rhino says I’m on the latest and so does the check now button
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.
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.