Girder Automation
Complete user manual for automatically placing bridge girders, crossheads, bearings and piers along an AutoBRIDGE Corridor — with live Plan and Section previews before execution.
What is Girder Automation?
Girder Automation is the superstructure placement engine inside AutoBRIDGE. Given an AutoBRIDGE Corridor already loaded in Revit, it calculates the exact 3D positions of every structural element across the full bridge length and places them in a single Revit run:
- Girders — Structural framing members spanning between supports, positioned at user-defined lateral offsets across the deck width.
- Crossheads — Transverse cap beams placed at every span node, sitting below the lowest girder bottom by a configurable offset.
- Bearings — Generic Model family instances placed at each girder end, seated at the crosshead level.
- Piers / Columns — Structural Column families placed beneath each crosshead, at configurable lateral offsets from the alignment centreline.
Girders
Structural Framing members. Placed per span, per offset. Elevation locked to corridor soffit via vertical ray-intersection.
Crossheads
Transverse cap beams at each span node. Width driven by Crosshead Layout. Level = min girder Z − crosshead offset.
Bearings
Generic Model families placed at each girder–support intersection, inset 0.5 m from the span node, at crosshead level.
Piers
Structural Column families below each crosshead. Lateral offsets and base level are fully configurable per project.
Full Form Layout
Girder Automation is a custom 1020 × 1090 px borderless window. The form has three major zones, arranged vertically: a top combo bar for source and element-type selection, a main work area split into a left canvas panel and a right control panel, and a bottom run bar.
Zone Layout Summary
| Zone | Label | Contents |
|---|---|---|
| A | Top Combo Bar | Two rows of drop-down pickers: Corridor · Girder type · Crosshead type (row 1) and Bearing family · Pier/Column type (row 2) |
| B-Left (top) | Plan View canvas | GDI+ zoomable bird's-eye of the corridor, deck hatch, girder lines, crosshead marks and pier dots. Driven by pictureBox1. |
| B-Left (bottom) | Section View canvas | Cross-section preview showing girder rectangles, crosshead, bearings and pier columns at the current settings. Driven by pictureBox2. |
| B-Right | Config Panel | Numeric inputs and Config. buttons for Spans, Girders, Piers and Crossheads, plus deck-edge parameter selectors. |
| C | Run Bar | Status summary line and the cyan RUN button (button8). |
Selecting the Corridor Source
The first combo box in Zone A (comboBox1) selects the AutoBRIDGE Corridor that defines the bridge centreline. Unlike the Pier Designer, Girder Automation works exclusively with AutoBRIDGE Corridor family instances — it does not support Civil 3D alignments or raw polylines directly.
How the corridor is read
When a corridor is selected, the code calls GetChainagePointsFromFamily() which scans all family instances in the active document for elements whose AutoBRIDGE_Type parameter equals "AutoBRIDGE_Corridor". The instance name is matched against the combo selection. The result is an ordered list of (XYZ Point, double Chainage) tuples representing the centreline geometry in Revit feet.
Corridor must already be placed
Place or load your AutoBRIDGE Corridor family in the Revit model before opening Girder Automation. The combo list is populated at form load by scanning all Generic Model instances for the AutoBRIDGE_Type = "AutoBRIDGE_Corridor" parameter.
Select from the drop-down
Click the corridor combo (left-most picker in Zone A, row 1). All corridor instances are shown by their family instance name. Selecting an entry immediately triggers comboBox1_SelectedIndexChanged, which refreshes both canvas views and re-populates the deck-edge parameter combos (comboBox4 / comboBox5) from the family's length parameters.
Verify the Plan View
After selection the Plan View canvas paints the corridor alignment in red with the deck hatch (green fill) and any configured girder / crosshead geometry. If the canvas remains blank, the corridor family may have no solid geometry — confirm the family is a Generic Model with a valid extrusion or swept blend solid.
GeometryInstance solid. If the corridor family contains no solid geometry the ray cast returns null and those girders are skipped entirely — the fallback Z = 0 is never used because it would corrupt crosshead elevations.
Selecting Element Types
Zone A contains five combo boxes arranged in two rows. Each picks a Revit family type for a different structural element. Only the Corridor and Girder Type are strictly required to enable the RUN button; the other three are optional and their placement is skipped when left unselected.
| Control | Revit Category | Description |
|---|---|---|
comboBox1 |
Generic Model | AutoBRIDGE Corridor — provides the alignment path and the solid geometry for elevation ray-casting. |
comboBox2 |
Structural Framing | Girder Type — Structural Framing family type used for individual girders. Populated from GetAllFramingSymbols(). Displayed as the family symbol Name. |
comboBox3 |
Structural Framing | Crosshead Type — Structural Framing symbol used for the transverse cap beam at each span node. Same symbol list as comboBox2. |
comboBox6 |
Generic Model | Bearing Family — A Generic Model family used for bearing pad instances. AutoBRIDGE Corridor families are excluded automatically. Leave unselected to skip bearing placement. |
pierComboBox |
Structural Columns | Pier / Column Type — Structural Column symbol placed vertically below each crosshead. Populated from GetAllColumnSymbols(). Leave unselected to skip pier placement. |
SelectedIndex = -1). The placeholder text reads "Girder type", "Bearing type", etc. Make sure to explicitly select a type — a placeholder-only combo will cause that element class to be silently skipped at run time.
What "Config." buttons open
The Crosshead Config. dialog (accessible via a separate button in the right panel) opens a sub-form (CrossheadForm) that exposes three additional crosshead parameters: the family name to use, the beam depth in mm, and how far the crosshead extends beyond the outermost girder on each side.
Configuring Span Layout
Span data defines where along the corridor each span begins and ends, and what skew rotation applies at that station. The right control panel has two ways to define spans.
Method 1 — Numeric Entry + Equal Spacing
Type the desired number of spans in numSpansTextBox. When the value changes, the code in numSpansTextBox_TextChanged divides the total corridor chainage equally into that many spans, producing a customSpanData list of evenly spaced stations. Click Config. (numSpanTabl) to open the Span Configuration Schedule and inspect or fine-tune each node.
Span Configuration Schedule (SpanTableForm)
The schedule dialog (SpanTableForm) shows one row per span node. Each row has two editable columns:
| Column | Unit | Description |
|---|---|---|
| STATION (METERS) | m | Chainage along the alignment at which this span node sits. Values are stored internally in Revit feet; the table converts automatically. |
| ROTATION (DEG) | ° | Skew angle at this node. 0° = perpendicular to the alignment. Positive angles rotate CCW when viewed from above. Both the girder start/end offset and the crosshead direction are skewed accordingly using trigonometric correction (offset / cos(skew)). |
Method 2 — Reference Group (Auto-Detect Spans)
The Ref. Group button (referenceButton) opens a small dialog listing all Revit Groups in the document. Select a group whose lines cross the alignment. The code intersects each group line with each alignment segment and records the distance along the path. The intersection points become span node stations and the angle between the group line and the alignment tangent is used as the skew rotation. This is ideal for bridges where span breaks are already drawn as detail lines or CAD groups.
Min / Max Span Length Limits
The minTextBox and maxTextBox fields in the right panel accept optional span-length limits in metres. When either is provided (value > 0) the plan view rendering highlights spans that fall outside the range. These are visual guides only and do not block placement.
Configuring Girder Layout
Three inputs in the right panel govern how girders are laid out across the deck width within each span.
Deck Width (deckWidthTextBox)
Total transverse width in metres over which girders are spread. The code divides this by (girdersPerSpan − 1) to calculate equal lateral spacing. The deck width is also used to draw the deck hatch in the Plan View and to scale the Section View. Changing this value live-repaints both canvases immediately.
Girders per Span (girdersPerSpanTextBox)
Integer number of girder lines per span. For equal spacing the offsets range from −deckWidth/2 to +deckWidth/2 in (count−1) equal steps. Click Config. (numGirderTabl) to open the Girder Offset Schedule and set custom lateral positions.
Girder Offset Schedule (GirderOffsetForm)
Offsets are measured in metres from the alignment centreline. Negative = left (towards decreasing Y in plan), positive = right. When custom offsets are present the girder count text box updates to match the number of rows. Clearing the custom list (by changing the textbox value) reverts to equal spacing.
Span Gap (gapTextBox)
A clearance in metres inset from both ends of every span before the girder beam starts. For example, 0.20 m means each girder starts 100 mm short of the support centreline on each side. Internally the gap is halved and applied as finalStart = pStart + girderDir × (gap/2) and finalEnd = pEnd − girderDir × (gap/2). This ensures girder ends do not clash with the crosshead solid.
Deck Edge Parameters (comboBox4 / comboBox5)
These optional combos select family parameters from the corridor family that encode the left and right edge distances from centreline. When set, the Plan View uses per-point varying width values for the deck hatch, accurately representing a superelevated or widened deck. Both combos are populated by scanning the corridor family for parameters of SpecTypeId.Length.
deckWidth / 2 on both sides, which draws the correct symmetric hatch.
Configuring Piers & Columns
The Piers section of the right panel controls how structural columns are placed beneath each crosshead.
Piers per Span Node (piersPerSpanTextBox)
Number of columns placed at each intermediate span node (the start and end nodes are not piers by default — they are abutments). The default value 2 places two columns symmetrically either side of the centreline. Click Config. (numPiersTabl) to open the Pier / Column Offset Schedule and specify exact lateral positions.
Pier / Column Offset Schedule (PierOffsetForm)
Offsets follow the same sign convention as the girder offsets: negative = left of centreline, positive = right. The default configuration at form load is { −2.0, +2.0 } metres.
Pier Base Level (pierBaseTextBox)
Absolute elevation (in metres) at which each Structural Column's base point is placed. The column top is positioned at the crosshead bottom (crosshead Z). The Revit API call doc.Create.NewFamilyInstance(basePoint, symbol, level, StructuralType.Column) uses this elevation as the base point Z coordinate. A value of 0.0 places column bases at the project datum.
k = 1 through N−1 where N = total nodes. The start (k=0) and end (k=N) nodes represent abutments and receive no automatic pier columns.
Section Preview — Pier view
The Section View canvas (pictureBox2) renders a live cross-section using the pier offsets and base level. Column rectangles are drawn in dark grey, their height proportional to the distance between pier base Z and crosshead bottom Z. The section updates in real time when any pier value changes.
Configuring Crossheads & Previewing
The crosshead configuration controls its vertical position and transverse extent, and the two canvas views give a live confirmation of the overall geometry before you commit to Revit.
Crosshead Offset (CrossheadOffsetTextBox)
Vertical drop in metres from the minimum girder bottom Z at a span node down to the crosshead top face. For example, 2.0 m means the crosshead sits 2 metres below the lowest girder soffit at that node. Internally: crossheadZ = minGirderZ[k] − (crossheadOffsetM / 0.3048). This value is also used as the drop distance for bearing placement.
Crosshead Layout Width (CrossheadLayoutTextBox)
Total transverse length of the crosshead beam in metres. The code places the beam from −layoutWidth/2 to +layoutWidth/2 in the skewed cross direction. The skew angle at the node is applied with a cosine correction: halfCrossFt / cos(skewDeg), so the projected length along the skewed axis is correct.
Plan View Canvas — Live Preview
The Plan View (pictureBox1, painted by pictureBoxGirder_Paint) draws in real time:
- A background grid (minor at 30 ft spacing, major at 5× minor).
- The corridor centreline in red.
- The deck hatch (green fill with dark green border) — width driven by deck-edge parameters or constant deck width.
- Yellow lines for each girder trace within each span.
- Red transverse lines for crossheads at each span node.
- Black dots for pier/column positions below the crossheads.
Section View Canvas — Cross-section
The Section View (pictureBox2, painted by pictureBox2_Paint) renders a front-on cross-section at the current settings:
- Yellow rectangles — individual girder cross-sections at their lateral offsets.
- Blue rectangle — the crosshead, spanning the configured layout width at crosshead Z.
- Cyan squares — bearing pads at each girder–node intersection.
- Dark grey rectangles — pier columns extending from crosshead bottom to pier base Z.
scaleFactor / panOffsetX / panOffsetY and the Section View in scaleFactor2 / panOffsetX2 / panOffsetY2.
AdditionalValue (AdditionalValueTextBox)
An extra vertical offset (in metres) applied during Section View rendering to shift the displayed geometry up or down for visual clarity. This does not affect placed element elevations — it is a preview-only display adjustment.
Running the Placement
The cyan RUN button (button8) in Zone C executes all placement operations in sequence. It triggers button8_Click which internally calls the same logic as the static RunGirderAutomation() method.
Chainage extraction
The corridor family's internal reference points are read to build the ordered (Point, Chainage) list. Total bridge length is derived as chainagePoints.Last().Chainage. Span node stations are interpolated along this path.
Geometry instance retrieval
A GeometryInstance is extracted from the corridor family instance. Three fallback strategies are tried: exact name match, partial name match against AutoBRIDGE_Corridor instances, and finally any AutoBRIDGE_Corridor instance in the document. If all fail, the run aborts with an error message.
Girder placement loop
For each span k and each girder offset j, start and end points are computed with skew correction. Two vertical rays (±500 ft) are cast from those XY positions through the corridor solid. Only if both ray intersections succeed is the girder placed via Adaptives.CreateBeamInstanceAll(). Span gap is applied before ray-casting. Girders within each span are grouped into a Revit Group ("Group Girders" transaction) for easy selection.
Crosshead placement loop
After all girders are placed, the minimum girder Z at each node is known. For each span node the crosshead centre is set at minGirderZ − crossheadOffsetFt. A beam instance is created spanning from left to right crosshead endpoints in the skewed direction, using the same CreateBeamInstanceAll() helper.
Bearing placement
If a bearing family is selected, bearings are placed in a single transaction ("AI: Place Bearings"). Each girder's start and end points (inset 0.5 m from the span node) were recorded during step 3. Bearings are positioned at the crosshead Z level using doc.Create.NewFamilyInstance() with StructuralType.NonStructural. An optional rotation aligns the bearing pad with the girder direction.
Pier / column placement
If a pier type is selected, columns are placed at each intermediate span node. For each pier offset (from the Pier Offset Schedule), an XY position is computed in the skewed cross direction. The column is placed from pierBaseZ up to crossheadZ using a Revit structural column transaction ("Place Piers"). Each column is an independent Revit element.
Completion summary
A result object (GirderAutomationResult) tallies GirdersCreated, CrossheadsCreated, BearingsCreated, and PiersCreated. A Revit task dialog confirms the count of each element type placed, or reports the error if something went wrong.
End-to-End Workflow
Open AutoBRIDGE → Girder Automation
In Revit, launch AutoBRIDGE from the Add-Ins tab. Select Girder Automation from the module list. The form opens centred on screen with all combos unselected.
Select the AutoBRIDGE Corridor
Pick the corridor from comboBox1 (top-left). The Plan View and Section View update immediately to show the alignment path and deck hatch.
Select Girder, Crosshead, Bearing & Pier types
Choose Structural Framing symbols for girder and crosshead (comboBox2, comboBox3). Optionally select a bearing Generic Model family (comboBox6) and a pier Structural Column type (pierComboBox).
Define span layout
Enter the number of spans in numSpansTextBox, or click Ref. Group to auto-detect from drawn reference lines. Click Config. to open the Span Schedule and set per-node station and skew rotation.
Set girder layout parameters
Enter Deck Width and Girders per Span. Click Config. on the Girders row to set custom lateral offsets. Set Span Gap to control end clearance.
Configure Piers & Crossheads
Enter Piers per Span Node and click its Config. for custom offsets. Set Pier Base level. Set Crosshead Offset and Layout Width.
Verify both previews, then click RUN
Check the Plan View (correct span count, deck hatch, girder lines) and Section View (correct girder / crosshead / pier proportions). Confirm the status bar, then click the cyan RUN button.
Review placement result
AutoBRIDGE reports how many girders, crossheads, bearings and piers were placed. Use Ctrl+Z multiple times to undo individual element classes if adjustments are needed.
Right Panel — All Controls
| Control / Field | Type | Description |
|---|---|---|
numSpansTextBox | TextBox | Number of spans. Changing this recalculates equal-spacing span data. Min 1. |
numSpanTabl — Config. | Button | Opens SpanTableForm with station + rotation per node. |
referenceButton | Button | Opens group picker; auto-calculates span nodes from intersections with a reference group's lines. |
deckWidthTextBox | TextBox | Total deck width in metres. Used for girder spacing and deck hatch rendering. |
girdersPerSpanTextBox | TextBox | Number of girders per span. Controls equal-spacing default; overridden by GirderOffsetForm. |
numGirderTabl — Config. | Button | Opens GirderOffsetForm to set per-girder lateral offsets from centreline. |
gapTextBox | TextBox | Span gap in metres. Inset applied symmetrically at each girder end. |
minTextBox / maxTextBox | TextBox | Optional span-length limits in metres. Used for visual highlighting in Plan View only. |
piersPerSpanTextBox | TextBox | Number of pier columns per intermediate span node. Default 2. |
numPiersTabl — Config. | Button | Opens PierOffsetForm for custom pier offsets from centreline. |
pierBaseTextBox | TextBox | Elevation of pier column bases in metres (project Z). |
CrossheadOffsetTextBox | TextBox | Vertical drop (m) from min girder Z to crosshead top face. |
CrossheadLayoutTextBox | TextBox | Total transverse span of the crosshead beam in metres. |
comboBox4 | ComboBox | Left deck-edge width parameter from corridor family. Optional. |
comboBox5 | ComboBox | Right deck-edge width parameter from corridor family. Optional. |
AdditionalValueTextBox | TextBox | Section View vertical display offset in metres. Preview only — does not affect placement. |
Keyboard & Mouse Reference
| Action | Control | Effect |
|---|---|---|
| Zoom Plan View | Scroll ↑↓ on pictureBox1 | Scales by ×1.15 or ×0.87 per step; adjusts scaleFactor |
| Pan Plan View | Left-drag on pictureBox1 | Shifts panOffsetX / panOffsetY |
| Reset Plan View | Double-click on pictureBox1 | Resets scaleFactor = 1.0, offsets to 0 |
| Zoom Section View | Scroll ↑↓ on pictureBox2 | Independent scale via scaleFactor2 |
| Pan Section View | Left-drag on pictureBox2 | Shifts panOffsetX2 / panOffsetY2 |
| Reset Section View | Double-click on pictureBox2 | Resets section zoom and pan independently |
| Move window | Left-drag title bar | WinAPI caption drag (borderless window) |
| Undo girder run | Ctrl+Z × N in Revit | Rolls back each transaction class in reverse order |
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
| Plan View blank after corridor selection | Corridor instance has no solid geometry, or the AutoBRIDGE_Type parameter is missing | Ensure the corridor family is a Generic Model with a valid solid and carries AutoBRIDGE_Type = "AutoBRIDGE_Corridor" |
| Girder combo is empty | No Structural Framing families loaded in the project | Load at least one Structural Framing family into the Revit project before opening the form |
| Pier combo shows "(No Structural Column families loaded)" | No Structural Column families in the document | Load a Structural Column family; the combo auto-populates on form open |
| Girders are placed but at wrong elevation | Corridor solid does not extend to the XY location of the girder end point | Confirm the corridor solid covers the full bridge width. Check that Deck Width ≤ actual corridor model width |
| Some girders are missing | Vertical ray returned null for that position (outside solid extents) | Reduce deck width, increase the corridor model width, or check for gaps in the corridor solid |
| Crossheads at Z = 0 | All girder ray-casts failed so minGirderZ remained at double.MaxValue | Fix the girder placement issue first; crosshead Z depends on a valid min girder Z |
| RUN button not responding | Form validation not passing — no corridor or girder type selected | Confirm both comboBox1 and comboBox2 have a valid selection (not placeholder text) |
| Skew geometry looks incorrect | Rotation column in span schedule set to wrong sign | Positive angle = CCW from above. Try negating the rotation value in the Span Schedule |
| Reference Group produces no spans | Group lines do not intersect the alignment within tolerance | Ensure reference lines cross the alignment centreline; tolerance is 0.001 Revit feet (≈ 0.3 mm) |
GirderAutomationResult — Output Object
When called programmatically via Girder.RunGirderAutomation() the static method returns a GirderAutomationResult object with the following fields:
| Field | Type | Description |
|---|---|---|
GirdersCreated | int | Total number of structural framing girder instances placed. |
CrossheadsCreated | int | Total crosshead beam instances placed (one per span node when crossheadTypeName is set). |
BearingsCreated | int | Total Generic Model bearing instances placed. |
PiersCreated | int | Total Structural Column pier instances placed. |
Error | string | Non-null string describes the failure if placement was aborted. Check result.Success (= string.IsNullOrEmpty(Error)) before reading counts. |