Today’s session at the B[BIM] Revit/Dynamo Self-Study Lab focuses on a cornerstone of library creation: the Door Family. We’re tackling the delicate balance between door frames, panels, and the logic required to toggle between "Open" and "Closed" states without breaking constraints.
Problem Diagnosis
The primary challenge in door family creation is the 0-degree constraint failure. When a door panel is closed (0°), Revit often loses the directional reference for the rotation arc, causing the family to "break" when the angle is changed back to a non-zero value. Furthermore, managing visibility—showing hidden swing lines when closed but hiding them when open—requires a rigid logical structure to prevent overlapping graphics or manual errors.
Revit-Native Workflow
You can achieve high-performance visibility control within the Family Editor without external tools by using a "Logical Toggle" system.
Reference Line Rotation: Never host a door panel directly on a Reference Plane for rotation. Instead, use a Reference Line. Align and lock the end-point of the line to the intersection of the frame and wall faces. Apply the
Angleparameter to this line.The Logic Gate (IF/NOR):
Create a Yes/No parameter:
Is_Open.Create a second Yes/No parameter:
Is_Closed.In the Formula column for
Is_Closed, enter:not(Is_Open).This ensures a perfect NOR-gate relationship: if one is on, the other is mechanically forced off.
Visibility Mapping:
Closed State (Hidden Lines): Select the symbolic lines representing the door swing in the closed position. In the Properties palette, link "Visible" to the
Is_Closedparameter.Open State (Panel & Swing): Select the open door panel and the 2D swing arc. Link their "Visible" property to
Is_Open.
Dynamo Design (Batch State Control)
In a large-scale project, manually clicking every door to "Open" for a 3D visualization is inefficient. Use this Dynamo logic to batch-control the visibility states.
Node Sequence:
Categories (Doors) > All Elements of Category: Selects all door instances in the project.
Element.GetParameterValueByName: Retrieve the current
Opening Angleor theIs_OpenBoolean.Python Script (Logic Toggle):
Python# Toggle the Boolean state for all selected doors input_list = IN[0] output = [not x for x in input_list] OUT = outputElement.SetParameterByName: Feed the toggled results back into the
Is_Openparameter to update the entire project instantly.
Expert Tip
Master the "Sub-Category" for Global Control.
Instead of relying solely on Yes/No parameters, assign your swing lines to a specific Sub-Category (e.g., Plan Swing [Hidden]). This allows you to control the visibility and line weights of all doors globally through Visibility/Graphics (VG) or Object Styles without entering the family editor again.
Workflow Shortcut: When testing constraints in the Family Editor, use the
Flexmethod. Change your parameters in the "Family Types" dialog and hitApplyinstead ofOK. This keeps the dialog open so you can troubleshoot multiple angles (0°, 45°, 90°) in rapid succession.
#Revit #BIM #Dynamo #Architecture #FamilyEditor #BIMManager #ConstructionTech


No comments:
Post a Comment