Dynamically setting input defaults for a ghpython component

What is the syntax used to set a default input in ghpython?
How do you access pManager to set the default input value for that Param?

Grasshopper.Kernel.Parameters.Param_GenericObject("", “”, “”, ??.GH_ParamAccess, input_value)

I need to set it so that when the gh file is reopened the last set default is still there.

I am not exactly sure what you are after, but you can have access to pManager when you compile the script yourself, after copying the compilable code.

1 Like

Not Python but…

1 Like

Aware of this method but I specifically need a ghpython solution for a compiled component.

Any example for the syntax used in python to do this?

I have a simple component that updates the number of inputs depending on what is connected downstream, these inputs are set with default values so if the user does not connect anything to them the component takes the default values.