In Revit, the View Discipline property is stored as a hash code of the main discipline list (Architectural, Structural, Mechanical, Electrical, Plumbing, Coordination). If you try using GetParameterValueByName, Dynamo will return this hash code.
Bakery package now includes these nodes for View Discipline management:
In today’s tutorial I have created another workflow and I will show how to create the openings but with the ductwork file inserted in the structure file as a link.
First we will use the Python Script node to get all the ducts elements from the link then we will pass those elements to the “Geometry.Intersects” Node. The intersection between two geometries is another geometry so we need to allocate the center of the intersection geometry thus we use the “Solid.Centroid” Node.
After we will got the intersection points we shall identify the duct and the beam that create each successful intersection.
Once we have the beam corresponding to each duct we will use a plane that is parallel to the beam and centered in the intersection point to get the boundaries of the intersection by get the intersection between the plane and the duct. As now we have the boundaries we can create the opening from them.
The Dynamo workflow file can be downloaded from here.
The sample Revit files can be downloaded from the following links: