Get connected components of a certain input of a different component

Hello,

I want to do benchmarking test with different GH-optimization tools like (Galapagos, Opossum, Octopus…).
In between the runs I wanted to reset the value of the numbersliders connected to a specific input of the optimization component (by the name of the Input).
I wanted to work with the IDs (Instance Guid) of the components to make sure I get no issues if the are two object with the same name.

So far worked with Python Scripts. If it doesnt work with python I m also open to other languages.

Input:
instanceGuidofOptimiziationComponent (String)
inputNameOfOptimaizationComponent (String)

Task:

  1. find NumberSlider objects that are connected to the input of the optimization component by name of the input and instance guid of the optimization component
  2. set the values of the numbersliders to the minimum of the slider

Output:
boolean “worked” True/False

Problem:
On the RhinoDeveloper page I found that GH-Components have the Attribute “Params”, which have the Properties Input or Output. Unfortunately either the Optimization Component nor the connected NumberSliders have the attribute “Params”. Is there a different way to find the objects connected?

I would be thankful for solutions!
Thanks
Paula

The easiest way to get connected components is with Metahopper.

Manually you can select upstream or downstream by selecting a component and press ctrl+left or right arrow key.