Cluster Dereference using C# , Phyton or VB Script

Hi Everyone!

Is there a way to “miss their path” or “dereference” referenced cluster or recreate the image attached using a C# , Phyton or VB Script? I got a c# script to mass update our clusters from this discussion:

https://discourse.mcneel.com/t/update-all-clusters-in-a-gh-script/73416/8?u=keelver_de_asis

but i think it only works if the clusters are all blackout . In some cases, eventhough there are updates on the reference file path, the clusters will not turn to black-not detecting the updates so I want to have a script that will force the cluster to turn to black so that now it can be updated with the mass update cluster script. Thanks to those who will help!

Hi, you just need to move or rename the referenced .ghcluster file. If the cluster doesn’t turn black after that, then probably your cluster is not referenced but internal. You can check if the “Internalise” option is active in the right-click menu over a cluster. If the option is not active, your cluster is not referencing any external file.

Hi @archimax! Thanks for taking time to reply on my post. The script you made for reference cluster mass update is also awesome and it really helped us a lot! Thanks for that.

We are using clusters all are reference not internalize, on our work and we have a folder as our server for the .ghclusters on which the clusters are referenced with. Whenever we update our clusters, we just edit the .ghcluster on the server, making all the referenced cluster turn “black”. Then we will use your cluster mass update script, put the file path of our server then click update to make the “black” clusters updated and back to normal again.

We noticed that the cluster will just turn black whenever the .ghcluster on the server is edited or if it cannot find the file path of the server. Cluster Mass update (your script) only functions if the clusters are turned to “black”.

There are times that even if the .ghcluster in server is updated, the referenced clusters used by our people would not turn blackwhich means they are not updated so the cluster mass update script is somewhat useless.

So my question is, is there other ways to somewhat force to severe the link of the referenced cluster to the server or file path by means of a c# script etc ,so that the clusters will turn black making the cluster mass update script usable.

Try this one, I added “forceUpdate” input. If true it will update all the clusters regardless if they are outdated or not.


UpdateAllClusters_forceUpdate.gh (8.5 KB)

Hi @archimax. Thanks for the reply. Does this also force to update or reroute the referenced clusters if I change the local path? I tried it but the reference file path of the cluster is still the same. Must be a nice function to have.

if you remove clusters from the old location they will be re-attached from the new one