Corridor Update from Civil 3D Alignment Changes
When a Civil 3D alignment or profile is revised, AutoBRIDGE can re-query the updated geometry and move every existing corridor family instance to its new position — preserving your spans, offsets, and subcategory assignments without rebuilding from scratch.
Why Update Instead of Rebuild?
After a Civil 3D alignment is revised — horizontal re-routing, vertical profile adjustment, or combined geometry change — the existing AutoBRIDGE corridor in Revit is no longer correctly positioned. Rebuilding from scratch means re-entering all span data, offsets, and subcategory assignments. The Corridor Update tool avoids that entirely.
Because AutoBRIDGE stores the Station, Original_X, Original_Y, Original_Z, Rotation, Offset_X, and Offset_Y parameters on every nested family instance during corridor creation, the Update tool can simply re-read those stations and re-query Civil 3D for the revised geometry at those exact same chainages.
Non-Destructive Update
Stations, span layout, EJ offsets and subcategory assignments all survive the update unchanged — only XYZ positions and rotations are recalculated.
Plan + Elevation Preview
Live interactive previews show the updated Civil 3D alignment in plan and the new profile in elevation — with the current corridor overlay drawn in red so you can see exactly what shifts.
Delta Report
Generate a comparison table showing Current vs Potential coordinates, ΔX, ΔY, ΔZ, XY displacement, and Δ Rotation per instance — exportable to CSV before you commit.
How the Update Works Internally
When you click UPDATE, AutoBRIDGE executes the following pipeline in order:
Read station parameters from existing nested instances
Opens the corridor family for editing and reads the Station parameter from every nested adaptive instance stored inside the family document.
Apply station offset (optional)
If an ST ± offset is entered, it is added to all station values uniformly before Civil 3D is queried — useful when the alignment start station has shifted.
Re-query Civil 3D at those stations
Calls PointsByStations2 and VectorsByStations2 on the alignment, and GetProfileElevationByStation on the profile to obtain new XYZ coordinates and tangent angles.
Delete existing solid/void forms
All Form elements in the family document are deleted so the loft geometry can be recreated cleanly at the new positions.
Move all nested instances in one transaction
Updates LocationPoint, Rotation, Station, Original_X/Y/Z, and Offset_X/Y for every instance inside the family document.
Move the parent family instance in the project
Translates the main corridor family's location in the Revit project document using the Project Base Point correction, placing it at the new first-station world coordinate.
Recreate solid and void loft forms
Calls CreateLoftForm for each subcategory name stored in SubcategorySolid and SubcategoryVoid parameters, regenerating the swept geometry.
Reload the family into the project
Calls familyDoc.LoadFamily(doc, new FamilyLoadOptions()) so the updated geometry is immediately visible in all Revit views — no manual reload needed.
Full Form Layout
The form is arranged in five vertical zones, matching the exact tableLayoutPanel2 row order in code: an Instance Family bar (A) with the corridor family picker and ST.± offset, a Civil 3D Alignment groupBox (B) with the three cascading combos and RL.± offset, a three-tab preview area (C) for Plan / Elevation / Report views, a live log panel + progress bar (D), and at the very bottom a Alignment info + RUN row (E).
Select the Civil 3D Document
The leftmost combo (comboBox1) lists every Civil 3D document currently open in the AutoCAD Civil 3D session running alongside Revit. AutoBRIDGE communicates with Civil 3D over COM and retries up to five times if the connection is unstable.
Choose the Civil 3D Source File
Open the Document dropdown (Zone A, leftmost). It will list the names of all .dwg files open in the Civil 3D session. Select the file that contains the alignment you want to use for the update.
- Civil 3D must be running and open before you open this form — otherwise the list will be empty and a warning dialog will appear.
- Selecting a document clears any current alignment and profile selections and resets the PLAN/ELEVATION previews.
- If Civil 3D returns an HRESULT COM error, AutoBRIDGE retries the query automatically up to 5 times before showing an error.
.dwg file loaded, then close and reopen the form.
Select the Alignment
The middle combo (comboBox2) is populated with all alignments found in the selected Civil 3D document. Choose the alignment whose geometry has been revised and that the corridor was originally built from.
Choose the Updated Alignment
Select the alignment name from the Alignment dropdown. Once selected, the PLAN tab preview canvas immediately renders the full alignment geometry as a white polyline with chainage labels at regular intervals.
- The interval between chainage labels is chosen automatically based on alignment length: every 1 m (length ≤ 100 m), 10 m (≤ 2 km), 100 m (≤ 10 km), or 1000 m (longer).
- Selecting a new alignment clears the profile selection (
comboBox3) and clears the preview caches. - The profile combo (
comboBox3) is populated after alignment selection by reading the profiles attached to that alignment.
Select the Profile
The rightmost combo (comboBox3) lists all profiles attached to the selected alignment. Choose the profile that was used when the corridor was originally created — typically the Finished Road Level or design road grade profile.
Choose the Updated Profile
After selecting the profile, switch to the ELEVATION tab to see the profile preview rendered as a blue curve with station tags and a datum reference line. If a corridor family is already selected in Zone B, the current corridor positions are drawn over the profile as a red overlay — giving you an immediate visual comparison of where the existing corridor sits versus the new profile.
- The profile curve is sampled every 2 m for a smooth draw with major labels every 100 m and minor ticks every 20 m.
- The red overlay uses the stored
StationandOriginal_Zparameters from the existing family instances — so it reflects the current Revit model positions. - Use the ↻ refresh button on the tab if the preview does not update automatically after profile selection.
Select the Corridor Family & Set Offsets
Zone B contains three controls used to identify the corridor to update and apply any coordinate adjustments before the Civil 3D query.
Corridor Family Type Name (comboBox5)
The Corridor Family Type Name dropdown lists every family instance in the active Revit document that carries the parameter AutoBRIDGE_Type = "AutoBRIDGE_Corridor". Each entry is a unique family name — which maps to one corridor that was previously created by AutoBRIDGE.
- Select the family name that corresponds to the corridor you want to update.
- AutoBRIDGE will open that family for editing (
doc.EditFamily) to access the nested adaptive instances inside. - Selecting this combo also updates the red overlay in the ELEVATION preview to show that corridor's current positions.
EL. ± Offset (additionalValueTextBox)
Applies a uniform vertical elevation shift to all family instances after the profile elevation is read. Enter a value in metres — positive to raise, negative to lower. This is useful when a survey datum adjustment has shifted the profile globally.
ST. ± Offset (additionalValueSTTextBox)
Applies a uniform station offset to all stored station values before Civil 3D is queried. If the alignment start station has been renumbered (e.g. from 0+000 to 100+000) but the geometry is unchanged, enter the difference here so that stations query the correct position. Enter in metres.
| Control | Default | Effect |
|---|---|---|
comboBox5 — Corridor Family | — | Identifies which existing corridor to update. Filtered by AutoBRIDGE_Type = "AutoBRIDGE_Corridor". |
additionalValueTextBox — EL. ± | 0 | Added to every profile elevation after Civil 3D query. Useful for datum corrections. Unit: metres. |
additionalValueSTTextBox — ST. ± | 0 | Added to every stored station before querying Civil 3D. Useful when alignment chainages have been renumbered. Unit: metres. |
Review the Plan & Elevation Previews
Before running the update, study the two preview tabs to confirm the alignment, profile, and corridor relationship visually. Both canvases are fully interactive.
Tab 1 — Plan View (pictureBox2)
Shows the Civil 3D alignment geometry in plan, rendered as a white polyline. Chainage labels are drawn at regular intervals (auto-scaled to alignment length) and tick marks indicate major and minor station points. This view helps confirm the overall alignment geometry looks correct before running.
Tab 2 — Elevation View (pictureBox1)
Shows the Civil 3D profile as a blue curve with station chainage ticks along the datum baseline. When a corridor family is selected, the current Revit corridor positions are overlaid as a red line — allowing direct visual comparison of how far the existing corridor has drifted from the updated profile. The vertical scale is exaggerated 10× for clarity.
| Interaction | Plan (Tab 1) | Elevation (Tab 2) |
|---|---|---|
| Zoom | Scroll wheel | Scroll wheel |
| Pan | Left-drag | Left-drag |
| Reset view | Double-click | Double-click |
| Force refresh | ↻ button on tab | ↻ button on tab |
Generate the Delta Report
The REPORT tab (Tab 3) lets you preview exactly what will change before committing the update to Revit. It computes the delta between every existing instance's current coordinates and the new Civil 3D coordinates at those stations — without modifying anything in the model.
Generate Report (buttonGenerate) & Export CSV (buttonExport)
Switch to the REPORT tab and click Generate Report. AutoBRIDGE reads the current family parameters and queries Civil 3D for the new values, then populates the table. No Revit changes are made at this stage.
Click Export CSV to save the full comparison table as a timestamped .csv file for review or project records.
The report table has 17 columns. For each nested instance it shows:
Run the Update
Click the UPDATE button (button3) to commit all changes to Revit. The operation runs through eight internal stages logged in real time in the log panel (Zone E) with a progress bar tracking completion.
Validation, Execution Stages & Completion
Before processing begins, AutoBRIDGE validates all selections. If any required input is missing, the log panel shows which field is incomplete and the update does not proceed.
Update Stage Progress
| Progress | Stage | What happens |
|---|---|---|
| 0–20% | Initialization | Validates selections; retrieves Revit doc, family document, and nested instances; reads SubcategorySolid / SubcategoryVoid parameters. |
| 20% | Delete old forms | All Form elements (loft geometry) in the family document are deleted in a Revit transaction, clearing space for the new geometry. |
| 22–65% | Civil 3D data retrieval | Reads station parameters; queries Civil 3D for XY coordinates, profile elevations, tangent vectors, and rotation angles at all stations. |
| 65–75% | Update nested instances | Single Revit transaction inside the family document: moves LocationPoint and sets Rotation, Station, Original_X/Y/Z, Offset_X/Y for every instance. |
| 75–80% | Update project instance | Moves the main corridor family's location in the Revit project document to the new first-station world coordinate, corrected by the Project Base Point. |
| 80–90% | Recreate forms | Calls CreateLoftForm for each solid subcategory name, then each void subcategory, regenerating all swept 3D geometry. |
| 90–95% | Reload family | Loads the updated family back into the project (LoadFamily with overwrite). All Revit views immediately reflect the new corridor geometry. |
| 95–100% | Finalize | Caches are refreshed; both preview canvases redrawn to confirm the final state. Success dialog shown. |
End-to-End Workflow
Make alignment/profile changes in Civil 3D and save
Edit the horizontal alignment or vertical profile in Civil 3D and save the DWG file. The changes should be reflected in the Civil 3D session before proceeding.
Save the Revit model
Before running the update, save the Revit project to create a restore point in case the undo chain needs to be used.
Open AutoBRIDGE → Corridor → Update from Civil 3D
The form opens, scans for Civil 3D documents, and populates comboBox1. Civil 3D must be running.
Select Document → Alignment → Profile (cascading)
Each selection auto-populates the next. The PLAN preview updates after alignment selection; ELEVATION preview updates after profile selection.
Select the Corridor Family (comboBox5)
Pick the AutoBRIDGE_Corridor family whose instances need to be updated. The ELEVATION preview overlays the current corridor positions in red.
Set EL. ± and ST. ± offsets (if needed)
Leave at 0 for a pure geometry update. Enter a value only if datum corrections or station renumbering are required.
(Optional) Generate Report → review → Export CSV
Switch to the REPORT tab, click Generate, review the delta values. Export to CSV for records. No model changes yet.
Click UPDATE and wait for the success dialog
The form processes all eight stages. When the dialog says "All parameters set successfully", the corridor is updated. Close the form and verify in Revit views.
Parameters Updated Per Instance
The following parameters are written to every nested adaptive instance inside the corridor family document during the update transaction:
| Parameter Name | Type | Description |
|---|---|---|
LocationPoint | Point (internal) | The spatial position of the instance inside the family document — updated to the new translated XYZ coordinates. |
Rotation | Double (radians) | Tangent angle of the alignment at the instance's station — recalculated from VectorsByStations2. |
Station | Double (feet/Revit internal) | Chainage value along the alignment — updated with any ST.± offset applied. |
Original_X | Double (feet) | World X coordinate from Civil 3D (absolute, before project base point correction). |
Original_Y | Double (feet) | World Y coordinate from Civil 3D (absolute, before project base point correction). |
Original_Z | Double (feet) | World Z coordinate (profile elevation) from Civil 3D, with EL.± offset applied. |
Offset_X | Double (feet) | X coordinate of the offset point (1 m lateral from alignment) — used for bearing calculation. |
Offset_Y | Double (feet) | Y coordinate of the offset point. |
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
| comboBox1 is empty | Civil 3D not running or no documents open | Ensure AutoCAD Civil 3D is open with the correct DWG file loaded. Close and reopen the form. |
| HRESULT COM error on open | Unstable COM connection to Civil 3D | AutoBRIDGE retries up to 5 times automatically. If it still fails, restart Civil 3D and try again. |
| PLAN preview is blank after alignment selection | Alignment has no geometry points, or length is 0 | Verify the alignment is fully defined in Civil 3D. Use the ↻ refresh button to retry. |
| ELEVATION preview shows no red overlay | Corridor family not yet selected in comboBox5, or family has no instances with valid Station parameter | Select a corridor family in comboBox5. Ensure the family was created by AutoBRIDGE (has AutoBRIDGE_Type parameter). |
| comboBox5 is empty | No AutoBRIDGE corridors in the Revit document | The corridor must have been created first using AutoBRIDGE Corridor Creation. This tool can only update existing AutoBRIDGE corridors. |
| "Family document not found" in log | The family name selected in comboBox5 cannot be found in the project families | Ensure the corridor family is loaded in the Revit project. Sync if using Revit Cloud/BIM360. |
| "Data mismatch detected" in log | Number of nested instances does not match the number of Civil 3D query results | Check that the alignment has stations covering the full range of the corridor. Ensure the ST.± offset is not pushing stations out of the alignment's extent. |
| Corridor moves but Z elevations are wrong | Wrong profile selected, or EL.± offset incorrectly set | Verify comboBox3 shows the same profile used during original creation. Reset EL.± to 0 unless a datum correction is intentional. |
| Update completes but geometry looks wrong | Direction of alignment may differ from original; or Project Base Point has moved | Check that the Civil 3D alignment direction matches the original. Verify the Revit Project Base Point coordinates have not changed. |
| Progress stalls at 20% | Form deletion transaction failed inside the family document | The log will show the specific error. Try reloading the family manually and re-running. |
| Revit freezes during update | Large corridor with many instances; normal behaviour | Wait for the WaitProcess spinner to close. Do not interact with Revit or Civil 3D during processing. |