Hi All,
How do you call Element.Solids in Python?
# Enable Python support and load DesignScript library
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
Conduits = IN[0]
OUT = [Cond.Solids() for Cond in Conduits]
to get solid i think you have to get the geometry like this
import clr
clr.AddReference('ProtoGeometry')
clr.AddReference("RevitAPI")
clr.AddReference("RevitNodes")
clr.AddReference("RevitServices")
from Autodesk.DesignScript.Geometry import *
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
elem=IN[0]
TransactionManager.Instance.EnsureInTransaction(doc)
geo= []
for e in elem:
geo.append(e.Geometry())
TransactionManager.Instance.TransactionTaskDone()
OUT = geo
@khuzaimah.ElecEng I can get e.Geometry() as you showed but I can’t get e.Solids()
khuzaimah.ElecEng:
geo.append(e.Geometry())
replace the word Geometry by Solid word?