(Question) Feeding GH bake result as input for GH

If you are working your way through this in python (a gh python component), this might help. I’m not sure this counts as OOTB…but, here you go. This example is gathering object usertext, that was assigned to objects in rhino.

import scriptcontext as sc
import Rhino

values = []
sc.doc = Rhino.RhinoDoc.ActiveDoc

objs = sc.doc.Objects.Find(x)
a = objs.Attributes.GetUserStrings()
for v in a:
    values.append(objs.Attributes.GetUserStrings().GetValues(v)[0])
b = values
c = objs.Attributes.Name
print dir(objs) 
sc.doc = ghdoc 

The dir function in python is really helpful when digging down into objects.
This is using Rhino 6. It also is not as robust as C# compiled solutions, (like Human or Elefront). But, it’s the general idea.


objAtts_ghpython.gh (6.6 KB)

Thanks Chris,

Yes, using scripting components is considered OOTB.

I was struggling translating one csharp script I found in the forums and now I understand why. It was because of the x data type. :slight_smile: