Hi everyone, I’m new to Dynamo. I am wondering is it possible if I could tag finishing wall, ceiling, floor inside of the room by roomtag. I heard we could get finishing material by room boundary but i dont know how to do it. Any help would be appreciated. Thank you.
Did you get a routine?
I’m looking for it also.
Yeah. I l have look for the information and then i found out something. I
will send you what i had right after I can acess to my computer
import clr clr.AddReference("RevitAPI") clr.AddReference("RevitServices") from Autodesk.Revit.DB import * from RevitServices.Persistence import DocumentManager rooms = UnwrapElement(IN) doc = DocumentManager.Instance.CurrentDBDocument calculator = SpatialElementGeometryCalculator(doc) elementMaterial = list() for room in rooms: results = calculator.CalculateSpatialElementGeometry(room) roomSolid = results.GetGeometry() roomMaterial = list() for face in roomSolid.Faces: for subface in results.GetBoundaryFaceInfo(face): if subface.SubfaceType == SubfaceType.Side: boundingElement = subface.GetBoundingElementFace() elementId = boundingElement.MaterialElementId materialName = doc.GetElement(elementId).Name roomMaterial.append(materialName) elementMaterial.append(roomMaterial) OUT = elementMaterial
Can you help me?
How should i use this code?
I don’t know too much about Dynamo hehe.
Copy and paste the code in a Python Script node, then connect your Rooms to the node.
this returns some code error not sure what it says…!
Just delete “.Name” at the end of this line and wire List.Clean + Material.Name nodes to the output instead…