algorithmic modeling for Rhino
Stupid question: how can I get the data type of an input parameter?
ghenv.Component.Params.Input... IsString? IsList? Is DataTree?
I try a couple of things but I didn't get it
Check this snippet of code: https://github.com/mostaphaRoudsari/dyfpy/blob/master/dyfpy/grassho...
TypeHint.TypeName will give you the type and Access will return item / list /datatree.
But this give me the TypeHint that I have choose?
And if I need the type of data that is entering?
I want to understand if I can change the behaviour of the script following the type of enetering data
else if (number):
and so on...
Let's call your input `value`. Then you can try something like this:
# assume it's a number
x = float(v) * 10
# it is None or string
if v is not None:
Anyway very useful