Im looking for a way to have a ghPython component add input parameters dynamically depending on some data received from the first input x. I’ve been trying to find ways to do this, but all I can find are about coding .gha plugins in C#. I’ve also been looking some at the ghenv.Component.CreateParameter, but not sure if it can be used in a ghPython component? Is there otherwise a way to achieve something similar?
Example pseudo-code of what I want to do with ghPython:
x = ["A", "B", "C", "D"] # x revieves a list of strings from another component for item in x: add input parameter item # iterate over the list, add input parameters with the same name as each string item.
After script has run input parameters to the ghPython component should be x, A, B, C, D.