Content cache does not execute due to active command

I recently changed my Aliases for the polyline, which has some unforeseen consequences for the content cache component.
Notice the difference in Aliases between:

  1. P for: * ! _PolyLine
  2. P + L for: ! _PolyLine

If I repeat the Polyline command in an Alias, Content Cache never actually resolves, thinking a command is still running. My scrip relies on detecting whether there is new geometry in a specific layer to automatically add User Text attributes. As a result, the attributes are not added, forcing me to manually trigger an update to the component.


The interesting thing is that the same thing happens when I perform extend, however, it does actually trigger an update for the content cache when I press enter. So shouldn’t the component also update when I finish the Polyline command?

Reason I changed the hotkeys was for Instant Aliases to work more akin to Fusion, where I repeat commands until I activate another or cancel.

Updated the post with the screen recording and screenshot that I couldn’t post earlier.

Please run SystmeInfo in Rhino and send the results here. We need to make sure we are testing the same versions here.

Since this applies to both Rhino 8 and the WIP, these are the systeminfo for both:
Rhino 8 - systeminfo.txt (2.8 KB)
Rhino WIP - Systeminfo.txt (3.0 KB)

Also can we get the definition and the file that is being used.

I can see that using Grasshopper to actively respond to and event like adding a new object to the file or updating and object could get quite confusing for Grasshopper. Normally we would use a plugin event watcher in C# or something to respond to any object added or updated in Rhino and then post processing of all objects could be custom.

Anyway, we do need to look at the specific logic in this case to see how it is falling apart.

@scottd I’ve added the part of the definition responsible for adding the attributes and a test file.
SimpleFloorPlan.3dm (174.2 KB)
Auto add attributes.gh (11.1 KB)

For the longest time during the Rhino 8 WIP I have been using similar logic and only now that I’ve changed my hotkeys does it break down. In any other circumstance it works fine.

I can recreate it here. We will be discussing this to determine what can happen in this instance.

1 Like

Thanks for looking into this!

This will be fixed on next 8.12 Release

1 Like

Awsome, thanks @kike!

I have come across this issue again.

Can’t modify the document while other command is running.

This time, the exact same part of the script works in isolation, but when inserted into a larger script, with a downsteam content cache, it fails.


Read-Write User Text.gh (27.0 KB)


I’m puzzled.

Okay, I have stripped down the files as much as I could, which was quite a bit of work.
Content Cache not Pushing_2.gh (247.3 KB)
Content cache not pushing.3dm (68.0 KB)

Basically I have this script, with two white groups that end with a red group that contains the problematic Content Cache components.

The individual problematic components are hidden behind the left arrow to make the post less imagery heavy.


The top white group is there to update the curve’s midpoint as I move it or trim/ extend it:

Though with the second group in the file (which is there to purge the old offsets and push the new ones for any curve with modified midpoint), neither are purging/ pushing. This is indicated by the midpoint symbol staying in its original place.

If I manually trigger the Purge (or hit F5 to Recompute), you can see what the script is supposed to do:


I have yet to find a workaround to make this happen without any manual intervention.
The script only contains Pufferfish and Pancake as plugins, both of which are on Packagemanager.

This is interesting, if I am really really quick to hit spacebar after a command, the first Content Cache component activates still. But regardless with what I think up, the second never does, despite both inputs suggesting it should. :thinking:

Problem clearly is that the inputs are there before the command finishes.

Now I’m thinking if there’s anything that would let me expire these Content Cache components when the command finishes? Or could that perhaps be added?

While MetaHopper’s Expire Object may occasionally work, the constant recomputation of the Content Cache (despite an empty input) makes it so that it can cause Grasshopper’s UI to freeze when opening the Pancake Analyse performance panel, for example.

It’s a shame this doesn’t work, because this essentially kills the infinite loop mechanism where I compare Rhino data against recomputed Grasshopper data and trigger updates based on changes.

After having consulted with @AndyPayne on my script a few weeks ago, I solved the issue of Active Command interference by using the Content Cache component with a Boolean Toggle set to True instead of using Grasshopper components to generate a True when the condition to Push is met.
While trouble shooting another issue I also found that Human’s Objects by Selection component, may interfere with the pushing of geometry even though the outputs are not connected to another part of the script. Disabling the Reset Toggle for the input also stops the interference.

1 Like