Hi all, need some help to achieve a new custom node. I wanna set a ParameterType in a method. I managed to get all available PT with a dir(ParameterType) command, but the output is a string, not the PT.
My goal is to allow user to select from a list of ParameterType and set the choice as input for the method. but as I get a string, I can’t make it work. How can I filter ParameterType in Python?
It looks as though you can use System.Enum.Parse to parse a string into an instance of an Enum. IronPython doesn’t have typeof, so I used clr.GetClrType instead. HTH
…standard default imports to Python Script…
import System
#The input to this node will be stored in the IN variable.
dataEnteringNode = IN
#test1 = System.Enum.IsDefined(clr.GetClrType(ParameterType),‘Text’) <- also works, produces value True
Just perfect David. exactly what I was looking for. far far above my present coding skill in fact. would never have found this alone. thanks and I hope you will find useful the packages I’m about to publish. I will probably make a blog post as it has to be handeld carefuly, it deals with shared parameter creation.