Search
AutoBRIDGE — Horizontal Variation (3D Polyline) · User Manual
AutoBRIDGE · Horizontal Variation — 3D Polyline Method

Horizontal Variation via 3D Polyline

Apply variable deck-edge widths to an AutoBRIDGE Corridor using 3D PolyLines from a linked CAD file as left and right boundary curves — selected by layer name and length.

AutoBRIDGE Horizontal Variation 3D Polyline Method
Module: WidthVariationPolyline.csAutoBRIDGE Modeler v2026Linked CAD PolyLines as Boundaries

What is Horizontal Variation (3D Polyline)?

The 3D Polyline method of Horizontal Variation uses CAD polylines from a linked DWG file as the left and right deck edge boundaries. It reads the polylines by their layer name and distinguishes between multiple polylines on the same layer by their measured length. The tool finds where perpendicular rays from each corridor instance intersect those CAD polylines and writes the measured distances into the corridor family's width parameters.

This is the preferred method when project edge geometry already exists in a CAD survey or design file — no Revit Model Line drawing is needed.

vs. Model Line method: The only structural difference is the boundary source. Model Line uses Revit Groups of model lines. 3D Polyline uses CAD layer polylines from a linked DWG. The corridor selection, parameter assignment, Plan View and RUN logic are identical in both methods.
🗂️

CAD Layer Selection

Pick boundary polylines by their DWG layer name — comboBox2/5 list all layers found in the linked CAD file.

📏

Length-Based Identification

When multiple polylines share a layer, distinguish the correct one by selecting its total length from comboBox3/4.

🔵🟢

Intersection Point Preview

Computed intersection points are shown as light blue dots (right) and light green dots (left) on the Plan View before RUN.

Full Form Layout

The form is nearly identical to the Model Line version but with one extra row inside the "Model Line Group" GroupBox — adding a second row of combos for polyline length selection. There are 6 stacked zones total.

AutoBRIDGE — Horizontal Variation (3D Polyline) Instances Family Corridor Family Type Name ▾ A — Corridor Selector Width Parameters Left Width Parameter ▾ Right Width Parameter ▾ B — Family Parameters 3D Polyline Source Left Polyline Layer ▾ Right Polyline Layer ▾ Row 1 — CAD layer names from linked DWG Left Polyline length ▾ Right Polyline length ▾ Row 2 — polyline lengths on the selected layer (select correct one) C — CAD Polyline Source [PLAN] N Corridor Centreline Right Polyline Intersections Left Polyline Intersections Width Stubs Left-drag to pan · Scroll to zoom · Double-click to reset view D — Plan View (GDI+) Left Results / Intersect Log Instance 1 — Left: 5.12 m Instance 2 — Left: 5.58 m Instance 3 — Left: 6.10 m Right Results / Intersect Log Instance 1 — Right: 4.78 m Instance 2 — Right: 4.92 m Instance 3 — Right: 5.44 m E — Result Log RUN F — Run Bar
Full form layout — A (Corridor) · B (Width params) · C (3D Polyline Source — 2 rows: layer + length) · D (Plan View with dot intersections) · E (Result log) · F (RUN). Key difference vs Model Line: Zone C has two rows and shows intersection dots instead of boundary curves.

Select the Corridor Family

1

Instances Family — comboBox1

Identical to the Model Line method. The full-width dropdown lists every family instance tagged AutoBRIDGE_Type = "AutoBRIDGE_Corridor" in the document, alphabetically. Selecting a corridor triggers comboBox1_SelectedIndexChanged which clears all cached geometry, repopulates comboBox6/7 with family length parameters, and repaints the Plan View.

Select Width Parameters

2

Width Parameters — comboBox7 (Left) & comboBox6 (Right)

The "Width Parameters" GroupBox contains two side-by-side combos — both populated from the corridor family's Length-type parameters. Selecting either combo immediately repaints the Plan View to reflect the current parameter values as offset stubs.

Width Parameters Width_Left ▾ comboBox7 — Left edge length parameter Width_Right ▾ comboBox6 — Right edge length parameter
Width Parameters group — same concept as Model Line method, but note the internal combo names differ (comboBox6/7 here vs comboBox4/5 in Model Line).

Select 3D Polyline Source — Layer & Length

This is the key difference from the Model Line method. The "3D Polyline Source" GroupBox has two rows of combos — first pick the CAD layer, then pick the specific polyline by length.

3

Row 1 — Layer Selection (comboBox5 left, comboBox2 right)

The top row lists all CAD layer names extracted from the linked DWG at form load via CADLayer.GetLayer(). Select the layer containing the left boundary polyline in the green combo, and the layer for the right boundary in the blue combo.

Row 2 — Polyline Length (comboBox4 left, comboBox3 right)

After a layer is selected in Row 1, the corresponding Row 2 combo is populated with the measured lengths of all polylines on that layer. Select the length that matches your target boundary polyline. This is how the tool identifies which polyline to use when multiple share the same layer.

  • Selecting the left layer (comboBox5) triggers comboBox5_SelectedIndexChanged → calls PopulateLengthComboBox() → fills comboBox4 with lengths and clears its selection.
  • Similarly, selecting right layer (comboBox2) fills comboBox3 with lengths.
3D Polyline Source ROW 1 — LAYER EDGE_LEFT ▾ EDGE_RIGHT ▾ ROW 2 — POLYLINE LENGTH (dependent on Row 1) 185.230 m ▾ 183.440 m ▾ ← Selecting a length identifies the specific polyline on the layer
3D Polyline Source — two rows. Row 1: CAD layer name. Row 2: measured polyline length on that layer. The Row 2 combo populates automatically when Row 1 is selected.
Tip: If only one polyline exists on a layer, Row 2 will have only one length entry. If multiple polylines share the layer, compare lengths with your CAD file to identify the correct boundary line.

Reading the Plan View

4

Plan View Canvas — pictureBox1 (with Intersection Dots)

The Plan View works the same as the Model Line version but with an important visual difference: instead of drawing the full boundary curves, it renders the computed intersection points as coloured dots — one dot per corridor instance per side. These dots are cached in cachedIntersectXYZR (right, light blue) and cachedIntersectXYZL (left, light green).

[PLAN] Right intersections Left intersections
Intersection dots replace boundary curves — each dot is where a perpendicular ray from a corridor instance hit the CAD polyline
[PLAN] Asymmetric width — left widens, right stays even
Example: asymmetric variation — left side widens progressively while right side stays roughly constant
ElementColourDescription
Corridor centrelineRedOriginal_X/Y parameters from corridor instances (cached for performance)
Right intersectionsLight Blue dotscachedIntersectXYZR — where the right-side perpendicular ray hit the selected CAD polyline
Left intersectionsLight Green dotscachedIntersectXYZL — where the left-side perpendicular ray hit the selected CAD polyline
Width stubsBlack (3 px)Lines from each centreline instance to its left/right intersection dot — visually confirms the computed width
Caching: The intersection points are computed once per corridor/polyline combination and cached. Changing only the width parameter combo does not re-compute intersections — only changing corridor, layer or length selection clears and recomputes the cache.

Run — Apply Horizontal Variation

5

Click RUN — Write Parameters from Cached Intersections

The cyan RUN button (button8) uses the already-computed cachedIntersectXYZR/L points — no re-intersection is performed at run time. For each corridor instance it:

  1. Retrieves the corresponding cached intersection point for both sides.
  2. Computes the distance from the corridor point to each intersection point.
  3. Writes the distance (in project units) to the selected Left and Right width parameters of that corridor instance via the Revit API Parameter.Set().
  4. Logs the computed value to the left (green) and right (blue) ListBoxes.

Model Line vs 3D Polyline — Method Comparison

FeatureModel Line Method3D Polyline Method
Boundary sourceRevit Model Lines / Arcs in named Groups3D PolyLines in a linked CAD DWG, selected by layer
Selection methodOne combo per side (Group name)Two combos per side (Layer name → Polyline length)
Plan View displayFull boundary curves drawn (light green / light blue)Intersection dots only (per corridor instance)
PerformanceRecomputes at every paint callCaches intersections; recomputes only on source change
Boundary preparationDraw Model Lines in Revit, group themProvide a linked DWG with boundary polylines on named layers
Corridor combocomboBox1 (same)comboBox1 (same)
Width parameter comboscomboBox4 (left), comboBox5 (right)comboBox7 (left), comboBox6 (right)
OutputFamily parameter write-back on all corridor instances · Values logged in ListBoxes

End-to-End Workflow

Link a DWG containing 3D boundary polylines

Ensure each boundary (left edge, right edge) is a 3D PolyLine on a distinctively named layer in the linked file.

Open AutoBRIDGE → Horizontal Variation (3D Polyline)

All AutoBRIDGE corridors and CAD layers are populated automatically at form load.

Select the corridor in comboBox1

Plan View paints the centreline. Width parameter combos populate.

Assign left and right width parameters (comboBox7, comboBox6)

Pick the corridor family length parameters that control the left and right edge distances.

Select left polyline layer and length (comboBox5 → comboBox4)

Pick layer → pick polyline length. Intersection dots appear in light green on Plan View.

Select right polyline layer and length (comboBox2 → comboBox3)

Pick layer → pick polyline length. Intersection dots appear in light blue on Plan View.

Verify Plan View — dots should sit on the intended edges

Black stubs should span from centreline to each dot. Adjust layer/length selection if dots are on the wrong polyline.

Click RUN

Intersection distances are written to corridor instance parameters. Review ListBoxes for per-instance values.

Troubleshooting

SymptomCauseFix
Layer combos emptyNo CAD file linked in the projectUse Insert → Link CAD to link the DWG containing boundary polylines
Length combo empty after layer selectionNo polylines on the selected layerConfirm polylines exist on that layer in the DWG; re-link if recently edited
No intersection dots appearPerpendicular rays from corridor instances do not hit the selected polylineVerify the boundary polyline spans the full corridor length; check that the correct layer and length are selected
Dots appear on wrong sideLeft and Right layer/length selections may be swappedSwap the layer selections between the left and right combos
Some instances show no dotBoundary polyline has a gap at that chainageFill the gap in the DWG, re-link, and re-select the polyline
Width parameters emptyNo Length-type parameters in the corridor familyAdd a Length parameter in the corridor family editor
AutoBRIDGE Horizontal Variation — 3D Polyline Method — User Manual
Module: WidthVariationPolyline.cs · AutoBRIDGE Modeler v2026 · Linked CAD PolyLines as deck-edge boundaries
Scroll to Top