Hey there
I’m trying to make a component that can save or rather send geometry to a Geometry Parameter (by Nickname) with a Button click. I used a Python Script from someone who did the same thing but to send text to a Panel. I tried to make some changes so it can do what i want it to do but after i dont no much about working with Python i got stuck.
I need this component for Human UI so that i can save the data i pick with the Rhino Pick Button
Thanks in advance
import Grasshopper as gh
def SetData():
for obj in ghenv.Component.OnPingDocument().Objects:
if obj.NickName in _Name:
obj.PersistentData.Clear()
obj.PersistentData.Append(gh.Kernel.Types.GH_Curve(_Geometry))
obj.ExpireSolution(True)
if _Set:
SetData()
import Grasshopper as gh
if run:
for obj in ghenv.Component.OnPingDocument().Objects:
if obj.NickName not in name: continue
obj.PersistentData.Clear()
for crv in crvs:
obj.PersistentData.Append(gh.Kernel.Types.GH_Curve(crv))
obj.ExpireSolution(True)
break