Horizontal Variation via Model Line Groups
Apply variable deck-edge widths to an existing AutoBRIDGE Corridor by reading Revit Model Line Groups as left and right boundary curves — and writing the values directly back into corridor family parameters.
What is Horizontal Variation (Model Line)?
Horizontal Variation modifies the edge-width parameters of every adaptive family instance along an existing AutoBRIDGE Corridor. Instead of a fixed width, each cross-section instance gets its own left and right distance — creating a corridor that widens, narrows, or follows a curved edge profile.
The Model Line method uses two named Revit Groups, each containing Model Lines or Arcs drawn directly in the project, as the left and right boundary curves. The tool finds where perpendicular rays from the corridor centreline intersect those boundary groups, and writes the resulting distances into the selected family length parameters.
AutoBRIDGE_Type = "AutoBRIDGE_Corridor" instances and writes back to their family parameters — it does not create new geometry.Model Line Boundaries
Left and right edges are drawn as standard Revit Model Lines or Arcs and organised into two named Groups.
Colour-Coded Plan Preview
The live Plan View shows the corridor centreline in red, left boundary in light green and right boundary in light blue, with black offset stubs at each instance.
Parameter Write-Back
Computed left and right widths are written directly to any length parameter in the corridor family — no manual parameter editing needed.
Full Form Layout
The form is a single-column layout with six stacked zones: Instances Family group → Width Parameters group → Model Line Group → Plan View canvas → Result ListBoxes → Run bar.
Select the Corridor Family
Instances Family — comboBox1
The top GroupBox ("Instances Family") contains a single full-width dropdown (comboBox1, placeholder "Corridor Family Type Name"). It is populated at form load with every family instance in the document that carries AutoBRIDGE_Type = "AutoBRIDGE_Corridor", listed by instance name in alphabetical order.
Selecting a corridor triggers comboBox1_SelectedIndexChanged which immediately calls PopulateParameterComboBoxes() — reading that corridor family's length parameters — and repaints the Plan View.
Select Width Parameters
Width Parameters — comboBox4 (Left) & comboBox5 (Right)
The second GroupBox ("Width Parameters") holds two side-by-side combos populated with all Length-type family parameters from the selected corridor family. Choose the parameter name that controls the left edge offset and the right edge offset respectively.
- Left parameter (green combo,
comboBox4) — the family parameter that drives the left-side deck edge distance from centreline. - Right parameter (blue combo,
comboBox5) — the family parameter that drives the right-side deck edge distance.
Select Model Line Groups
Model Line Group — comboBox3 (Left) & comboBox2 (Right)
The "Model Line Group" GroupBox has two side-by-side combos (comboBox3 left, comboBox2 right). Both are populated at form load with every named Revit Group in the document. Each group should contain Model Lines or Model Arcs that represent one edge boundary of the bridge deck.
- Draw your left-edge boundary lines in Revit as Model Lines.
- Select them all and use Create Group to name the group (e.g.
Edge_Left). - Do the same for the right edge (
Edge_Right). - Select these group names in the two combos.
Once groups are selected, the Plan View repaints showing the group curves in their respective colours alongside the corridor centreline.
GetLinesAndArcsFromSelectedGroup() which reads only Revit model curve elements from the group membership.Reading the Plan View
Plan View Canvas — pictureBox1
The large grey canvas occupies most of the form. It renders a top-down (plan) view of all geometry, auto-scaled and centred on the corridor bounds. The view updates live whenever a combo selection changes.
| Drawn Element | Colour | Source |
|---|---|---|
| Corridor centreline | Red | Original_X / Original_Y parameters of corridor instances |
| Left boundary curves | Light Green | Lines/Arcs from the Left Model Line Group (comboBox3) |
| Right boundary curves | Light Blue | Lines/Arcs from the Right Model Line Group (comboBox2) |
| Width offset stubs | Black (3 px) | Perpendicular from each corridor point in the Offset_X/Y direction, scaled to the current width parameter value |
| Extended ref rays | LightBlue/LightGreen dashed | The full perpendicular line extended 500 units each way — used internally for intersection calculation |
Run — Apply Horizontal Variation
Click RUN — Write Parameters to All Instances
The cyan RUN button (button8) validates all inputs then processes every corridor instance:
- For each corridor instance, get its position and the perpendicular direction (
Offset_X/Y − Original_X/Y). - Extend a line 500 units in both perpendicular directions.
- Intersect that ray with the left model line group curves → measure distance → write to Left Width Parameter.
- Intersect with the right group → measure distance → write to Right Width Parameter.
- Results are appended to the green (left) and blue (right) ListBoxes below the canvas.
End-to-End Workflow
Draw left and right boundary lines as Model Lines in Revit
Draw lines/arcs tracing the intended left and right deck edges. Use Create Group to collect each side into a named group.
Open AutoBRIDGE → Horizontal Variation (Model Line)
The form opens. All AutoBRIDGE corridors and Revit Groups are listed automatically.
Select the corridor in comboBox1
The Plan View shows the centreline. The Width Parameter combos fill with family length parameters.
Assign Left and Right width parameters
Pick the corridor family parameters for left and right edge distances from the green and blue combos.
Select Left and Right Model Line Groups
Pick the group names from comboBox3 (left) and comboBox2 (right). The Plan View updates showing all three curves.
Verify the Plan View preview
Confirm black stubs reach the boundary lines at every instance. If a stub is too short or overshoots, check that boundary lines cover the full corridor length.
Click RUN
AutoBRIDGE computes intersections and writes both parameters to every corridor instance in a single Revit transaction. Review the result ListBoxes for per-instance values.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| comboBox1 is empty | No AutoBRIDGE_Corridor instances in document | Run Corridor Creation first to place corridor instances |
| Width parameter combos empty | No Length-type parameters in the corridor family | Add a Length parameter to the corridor family in the Family Editor |
| Model Line Group combo empty | No Revit Groups in the document | Draw boundary lines and use Create Group before opening the form |
| Black stubs do not reach boundary | Width parameter has a value larger than the actual boundary distance | Run RUN — the tool computes the correct intersection distance and overwrites the existing parameter value |
| Some instances skipped (no value written) | Boundary group lines do not cover that portion of the corridor | Extend boundary lines to cover the full corridor chainage before running |
| Pink message in Plan View | Parameter is currently family-associated (not instance-level) | AutoBRIDGE dissociates it automatically — continue with RUN |