Create script to extract cluster objects - Help!

So, I have a grasshopper document.

I have created a cluster with many different outputs and to each output there are specific geometry outputs, it can be breps, surfaces, curves, polylines, all object types available in grasshopper.

What i want is a python script that from input x searches the grasshopper file for a specific group name (that i input) and in input “y” I want to be able to input the specific cluster output im interested in and then from output “a” from the python script i want to extract the geometries available from the cluster/clusters based on my input “x” and “y”

So for example:

  • I have a cluster in a group named “test”
  • The cluster outputs i have are: a, b, c, d

In this example I now want to in the python script put in “test” in x and “b” in y → I want output “a” from the python script to give me all geometries from the cluster/clusters in group “test” from output “b”

Can someone please help with this?

please post your gh file with the cluster, in such a way to be able to evaluate what data structure/s is/are in play

difficult to guess stuff with text explanation alone

(post deleted by author)


cluster_output.gh (8.9 KB)
(If there are multiple matching clusters or multiple matching output parameters, then this script will just return the first one it finds.)