How can i get the value of parameter_integer through the GHpython

for example, the value of this cell is 5.
I only get the cell through the ghpython ,but which path can help me find the value of the integer battery.

Hi Peter

do you want to know the path of the datatree?
If so, you need to switch the param input Access to “Tree”.



Giulio Piacentino
for Robert McNeel & Associates

Hi,Mr.Giulio. For example, through a simple caculation, It produces a number stored in the integer battery. I hope to get this value in ghpython,but I don’t know how to access this data in ghpython.

The answer is to connect the integer battery to the GhPython component. This is Grasshopper.

If you know the ID of the component, or something unique like a special name, you could search for it in the document, but this basically violates all rules of GH.

1 Like

Mr.Giulio. I found the battery through ghpython, but I didn’t find the value stored in its attribute name.

But I can’t find which attribute name store this value

If the component computed at the time you access it, then the computed datatree will be in its GH_Param.VolatileData Property, otherwise, this property will be empty.

If the param supports storing data inside itself, then it will have a PersistentData attribute. That one contains the data before computation.


Thank you for your help,Mr.Giulio. I will try to solve it