How can I set the value of an output without explicitly using a = 5.
I think it can be done using ghenv.Component.Params.Output[1].SetValue(), but I don’t know exactly what I need to provide to the function.
Error message: “”" Runtime error (TypeErrorException): cannot access protected member SetValue without a python subclass of GH_DocumentObject
What I would like to do is pass through the value from all inputs to outputs. The exec way works for now, but is not good python code and I don’t think it would work for more complex data types. Your python example leads to a < null > element at index 0, is this a bug? The attached code snippet doesn’t seem to make much sense now, but I am planning to either pass through or return a different value later on.
How can I actually return the value - for example 6?
Hi! I would just like to check if there has been any developments on this?
I too am trying to work on something similar. What I’m trying to do is pass data from dynamic and variable inputs to dynamic and variable outputs as well. I am mostly looking into AddVolatileData but I am not exactly sure yet how this works.
The exec method is the way to go. It could be adapted to be positional rather than nominal (first with first, etc). If you don’t like exec, which is understandable, you could use
globals()[output.NickName] = input_value
Thanks,
Giulio
–
Giulio Piacentino
for Robert McNeel & Associates giulio@mcneel.com