Setting the action to true/ false with a boolean also doesnât prompt any updates:
Using the trigger component on the content cache leads to Rhino becoming unresponsive.
It seems like triggering the User Text component is the best I can do, though I rather not brute force the updates and just use a boolean value to trigger one.
Likely the best method to detect User Text changes is to trigger User Text updates on a timer to then compare it to the previous values, though as of now I am not quite sure how well this scales on larger datasets.
The Content Cache component has changed a bit since you used it in beta.
The âRed Down Arrowâ indicates you are pushing content to the model and the âPush Contentâ black button below that is a manual button. Meaning, you will not see updates unless you push that.
If you want continuous, real-time updates, zoom in on the Content Cache component and click the + that appears to expand additional parameters (Or use âShift+Double Clickâ) and then hook up a Boolean Toggle to the P input and you should see the real-time updates.
Are you working with Grasshopper geometry or Rhino Geometry that you are referencing?
The Query Model Objects component will update the Content Cache in Real-Time and the User Text will update with thatâŚ
If you are only inputting Grasshopper geometry that is being cached in the model but was not referenced from the model then I donât believe it will update the values by default.
But⌠If iâm not mistaken, Intuos want to do the opposite: reading/detecting user text whenever they changes. (seen your edit nowâŚ)
Problem: editing the actual geometry will trigger referenced params in grasshopper to expire and recompute, but just editing attributes like layer, color, user-texts, will not.
@AndyPayne , there are some component in the new tab that lets one do this?
I am referencing geometry from Rhino, but since I have not separated out my curves to particular layers (I am only using some curves on a layer and need to rework the others as I go), Iâm starting with referenced curves in a curve component. I want to add the attributes I need for the script as user text and use those as scrip input values. So whenever I change the attributes, I need to pull them back into Grasshopper to update the User Text component values. And for that, I need to detect changes in the most efficient way possible as to not bog down the script later on. I might be using this method several times for multiple parts of the script after all.
I guess I might as well tag @kike seeing as he worked on the new Content Cache.
@Intuos how are you referencing the geometry from Rhino?
If you are using the Query Model Objects component, it should be updating the User Text in real-time just fineâŚ
If you have a geometry container such as Geometry or Brep that you âRight Click Setâ the references with, I donât think that will update.
The QMO component will expire the cache to ensure the changes are updated⌠basically the QMO component âlistensâ for Rhino Document changes and then expires downstream components when it âhearsâ something changed. (Please correct me if Iâm wrong on that)
So likely, you just need to use a QMO to âgetâ your referenced Rhino Geometry.
If you already are doing that⌠then something else is at play
act as some sort of âGeometry pipelineâ component.
Itâs quite hard to âlinkâ only specific geometries, it should work with guids, but it canât ⌠(right?).
Thatâs what guids are made for.
In the meantime a dev will shine some light, i made thisâŚ
The c#script itself will just pass the input data to the output, straight. Guids.
If any rhino object have its attributes changed, and the guid is part of the list, the c# component will expire itself as whole.
Works with lists, trees untested.
Indeed, it does not, hence the trigger component to make it update. Notice that when you plug in the output of the geometry container into a new User Text, the value is updated. This can cause confusion as well as unpredictable scripts.
But it used to be such that when you plug a geometry container into a User Text component, it would reference the Rhino geometry directly and update accordingly. The fact that this is now missing or stopped working is really throwing off my old scripts and makes new scripts that compare Grasshopper attributes to those in Rhino really convoluted (and slower due to having to use multiple Geometry Caches.
Thanks @kike, itâs good to know that this option exists.
But what if I want to use referenced curves in a curve container (so I get the ease of manually picking my geometry and update small parts as I go)? Say I have a bunch of buildings and itâs easier to manually select than to sort a whole lot of unsorted data. I donât want to resort to curve in curve sorting if I donât have to as it forfeits ease of use.
E2: Though I want this to be near instant as I used to be able to use it during the beta. All Iâd need is something to trigger the pull once, whenever thereâs a true for the set difference. Right now, the pull creates a semi-loop, as the âtrueâ value keeps on feeding content to pull from Rhino.
Could you make the user text expire on attribute change (meaning if it references Rhino geo + attributes and the latter are changed, they auto-update)? That would also get rid of the inconsistencies that User Text values change depending on when the component is placed on the canvas (before or after attribute changes).
Without that, Iâd need to read, pull on change, then push so the curves are updated to update the User Text⌠(in theory).
The idea is having the user pick some curves, and those curves will have automatically added the key/value pairs nedded (with "Ensure). It works.
But then when the user manually change some values per-object, the component âUser Textâ never expire, never refresh.
this ^ do work. But you canât specify the type of geometry.
those 2 ^ do not work. They wonât refresh.
âModel Objectâ param will refresh when an object attribute changes only if the geometry was referenced directly from the Model Object param itself.
Is this how it was meant to be?
âQuery Model Objectsâ , similar to the old âGeometry pipelineâ is not a solution because it would refresh any time ANY geometry in the document is changed⌠too much.
Since there is no text on your post I will try to understand your expectations from the image.
I guess that when you say update you mean expire the solution.
The Brep param only references the geometry side of the object, is currently used in many existing definition pre v8 and we canât make it expire on any change now, that would break existing definitions and the way the users expect this to expire.
The ModelObject param references the whole object, this includes the attributes and the user-text. This is why it expires when any change on the referenced object happens. Unfortunately it also expires when a change on its `Layerâ occurs (we should fix that).
Brep-Guid-ModelObject, this is more convoluted. Iâm aware a Guid-Geometry conversion makes the resulting Geometry being expired when its content changes, but this is assuming the Guid belongs to the active document. My intention is to avoid this kind of assumptions on how Model Content types work, in order to enable a future implementation where you can deal with multiple documents, or a Grasshopper definition can run unambiguously on a server that has no active document.
That said, we are working to make intermediate references expire when relevant changes happen without having to expire the solution from the beginning (as in case 2). This change will make expire all this three cases when you expect, if I understood you correctly.
I really do hope these kinds of âlegacyâ decisions will be addressed in Grasshopper 2, so it will be more consistent across the board with less exceptions as to why things work differently.