Hello,
I’m trying to use GH components via Python to send geometry to Revit.
When I pass a list of GUIDs through the .AddDirectShapeGeometry() I’m only getting the last item on the list in Revit. How can get the full list of objects through this method?
Also, I can’t seem to get in any objects of Structural Columns.
Please see .3dm attached.
Thanks,
Dan
tester.3dm (3.4 MB)
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino.DocObjects as rd
import Rhino.Geometry as rg
import System.Drawing as sd
import Rhino
import ghpythonlib.components as ghcomp
x = rs.GetObjects()
for i in x:
name = rs.ObjectName(i)
catString = rs.GetUserText(i,"RV-Category")
print catString
if catString is None:
print "This object needs a RV-Category assignment"
catValue = ghcomp.RhinoInside.QueryCategories("Model",catString)
print catValue.Name
if catValue is not None:
DS = ghcomp.RhinoInside.AddDirectShapeGeometry(name,catValue,i)
print DS