How can I update a Grasshopper user object/ cluster (without changing the inputs / outputs at the boundaries of the cluster) while using python for example with the GH_UpgradeUtil (Grasshopper.Kernel.GH_UpgradeUtil)? How would a manual update process without python look like?
Is GH_UpgradeUtil only available for components?
I want to improve user objects over the time and then decide wether I want to update the old versions of it in documents. Is the update process
I found this: Ladybug update
This only seems to work for pure python code, as it seems like only the code attribute of gh python components get’s updated.
I don’t think you can use GH_UpgradeUtil on user objects / clusters. It’s designed for plug-in authors to enable upgrading from one version of a component to another. It operates on the basis of the component Guid — all clusters have the same Guid so it wouldn’t know how to differentiate between them. You’ll have to write or find something custom for this purpose.
You could externalize your clusters via the “Export and Reference” menu item — this saves them out as external files. Then, make a user object from the referenced cluster. If you edit the cluster at any point and save it, it will modify your external .ghcluster file. The next time you add the cluster as a user object you’ll see this:
You can right click it and choose “Update” to load the latest version of it from the external file. That’s one way to propagate your changes to every instance of a cluster, but it’s not totally automatic.
This seems to work for one user, but how can I dynamically edit the referenced path of the clusters?
There are several users, which would reference different file paths for the clusters.
Can I dynamically adapt the path to the clusters from a C# or python component?
Would a symlink leading to the different folders be enough to avoid the problem of different paths?