3D String from
Civil 3D Alignment + Profile
Select a running Civil 3D document, pick an alignment and its vertical profile, set a station interval and Revit topography surface, then generate a fully 3D spline family that follows both the horizontal alignment and the design vertical grade.
What Does This Tool Do?
The Civil 3D Alignment tool (AlignmentC3D) reads live data from a running Autodesk Civil 3D session, samples the selected alignment's horizontal geometry and vertical profile at a user-defined station interval, projects those stations onto a Revit topography surface to obtain 3D coordinates, then creates a parametric spline family (AutoBRIDGE_3DString_IDxxxxx) placed precisely in the Revit model.
Live C3D Link
Reads open Civil 3D documents in real time — no import/export needed.
Plan + Profile
Combines horizontal alignment geometry with vertical profile elevations into true 3D stations.
Dual Preview
Live Plan view (top) and Elevation view (bottom) both update as you configure selections.
Topo Projection
Optionally projects plan stations onto a Revit Toposolid or TopographySurface to snap Z to the existing ground.
Form Layout — Four Zones
| # | Zone | Location | Purpose |
|---|---|---|---|
| 1 | Selector Bar (Row 1, 5%) | Top strip | Three linked dropdowns: Civil 3D Document → Alignment → Profile |
| 2 | Dual Canvas (Row 2 left, ~80%) | Main body left | Top half: Plan view (pictureBox2, [PLAN] label) — draws alignment in 2D top view with topography footprint. Bottom half: Elevation view (pictureBox1, [ELEVATION] label) — draws the vertical profile at H1:V10 exaggeration with STA/EL tags. |
| 3 | Right Panel (Row 2 right, ~16%) | Main body right | Interval Spacing spinner (numericUpDown1, 1–200 m, default 10 m) + Revit topography dropdown |
| 4 | Bottom Bar (Row 3, 8%) | Bottom strip | Alignment info label showing name / start station / end station + cyan RUN button (120×40 px) |
What Gets Created
A new Revit Generic Model family named AutoBRIDGE_3DString_ID{random} is saved to Documents\AutoBRIDGE\Modeler\2026\family_template\{template}\Temp\, loaded into the project, and placed at the first computed 3D station point. The spline passes through every station as a CurveByPoints object inside the family document.
Select the Civil 3D Document
comboBox1 (leftmost in the top bar) lists all Civil 3D documents currently open and accessible via the AutoBRIDGE Civil3D bridge. The list is populated by PopulateCivil3DDocuments() which calls Civil3DApplication.GetDocumentNames(). Up to 5 retry attempts are made automatically if the COM connection returns HRESULT: 0x800706BE.
Select the Open Civil 3D Drawing
Click comboBox1 and choose the Civil 3D drawing (.dwg) that contains the alignment you need. Each item in the list corresponds to one open document tab in Civil 3D.
Selecting a document triggers comboBox1_SelectedIndexChanged which stores the selected Civil3DDocument reference and calls PopulateAlignments() to fill comboBox2. The plan and elevation canvases reset.
Select the Alignment
comboBox2 is populated by PopulateAlignments() which calls Civil3DDocument.GetAlignments(selectedDoc). All alignments found in the selected Civil 3D document are listed by name. Selecting one immediately draws the alignment in the Plan canvas and clears the Profile dropdown.
Pick the Alignment from the List
Select the horizontal alignment you want to convert to a 3D string. The plan canvas (pictureBox2, labelled [PLAN]) draws the alignment as a polyline in 2D plan view. If a Revit topography element is also selected in the right panel, its convex hull footprint is shown as a filled semi-transparent polygon.
The status label at the bottom updates to show: Alignment Name: [name] || Start Station: [X.XXX] || End Station: [Y.YYY]
Select the Vertical Profile
After selecting an alignment, comboBox3 is populated with all profiles attached to that alignment via selectedAlignment.GetProfiles(). Select the design profile (vertical geometry) you want to use for elevation data. This drives the Elevation canvas.
Pick the Design Profile
Select the profile name from comboBox3. The elevation canvas (pictureBox1, labelled [ELEVATION]) immediately renders a vertical section view at an exaggerated H1:V10 ratio. The X-axis represents station distance; the Y-axis shows the design elevation.
Every station is tagged with a vertical drop line to a datum, with STA= X.X m (rotated 90°) and EL= Z.Z m labels at each interval point. A datum line labelled Datum: N.N m is drawn across the full profile length.
Set Interval Spacing & Topography
The right panel contains two controls: a spinner to set how densely stations are sampled along the alignment, and a dropdown to select the Revit topography element whose surface will be used for vertical intersection if needed.
Set the Interval Spacing
numericUpDown1 (labelled Interval spacing:) controls the arc-length gap in metres between successive station points. Range: 1–200 m, default: 10 m. Every change to this value clears the preview cache and redraws both canvases.
Smaller intervals produce smoother 3D splines on curved alignments but increase the number of reference points in the family. For straight alignments a spacing of 20–50 m is usually sufficient; for tight curves use 5 m or less.
Select the Revit Topography (Optional)
The topography dropdown (right panel, below the spinner) lists all Toposolid and TopographySurface elements found in the active Revit document, labelled as SurfaceName (ID: xxxxxxx). Selecting one enables visual display of the topo footprint in the Plan canvas.
When selected at RUN time, the tool projects each plan station vertically (ray cast) through the topography geometry to find the surface Z value — overriding the profile elevation with the existing ground level at that station. Leave this blank to use the Civil 3D profile elevation exclusively.
Right Panel Layout
Reading the Dual Preview Canvases
The main body is split into two stacked interactive canvases, each occupying roughly half the available height. Both support pan and zoom independently.
Plan Canvas (Top Half — pictureBox2)
Shows the alignment in 2D top view (north up). All station points are shown as white dots at the selected interval. If a topography element is selected, its plan footprint is shown as a semi-transparent green filled polygon (convex hull of all topography points). This lets you verify the alignment route lies within the topo extent before running.
| Action | Input |
|---|---|
| Pan | Left-button drag |
| Zoom | Scroll wheel (10–3000% range) |
| Reset | Double-click |
Elevation Canvas (Bottom Half — pictureBox1)
Shows the vertical profile as a red line plotted on a station (X) vs elevation (Z) graph at an exaggerated H1:V10 vertical scale. Vertical drop lines at each station carry rotated STA and EL tags. A datum baseline is drawn at the bottom with a label showing its elevation. This view lets you confirm the profile grade, identify peaks and sags, and verify that the elevation values look correct before committing the run.
| Action | Input |
|---|---|
| Pan | Left-button drag |
| Zoom | Scroll wheel (10–2000% range) |
| Reset | Double-click |
Run and Validate
Click RUN — Six-Stage Pipeline
The cyan RUN button executes the following sequence, tracked by a progress bar:
- Validate selections — checks that all three dropdowns (document, alignment, profile) are selected. Shows specific error dialogs if any are missing.
- Get curve elements — retrieves the horizontal alignment geometry from Civil 3D.
- Station sampling — generates a station list from 0 to alignment length at the chosen interval using
CreateRange(). Progress: 1–21%. - Point extraction — calls
GetPointsAtStationsFromCurves()which tessellates each alignment segment and interpolates XY positions at every station. Progress: 10–20%. - Topography intersection — if a topo element is selected, each XY station is cast vertically through the Toposolid/Topography geometry to find the surface Z. Progress: 25–66%.
- Family creation & placement — creates a new family document from the selected template (.rft), builds a
CurveByPointsspline through all adjusted points, saves the .rfa file, loads it into the Revit project, and places an instance at the first point. Progress: 68–100%.
AutoBRIDGE_3DString_IDxxxxx where xxxxx is a random 5-digit number. The .rfa file is saved in Documents\AutoBRIDGE\Modeler\2026\family_template\{template}\Temp\.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| comboBox1 empty on open | Civil 3D not running or no document open | Launch Civil 3D, open the project drawing, then re-open this form |
| Error: HRESULT 0x800706BE after retries | COM connection to Civil 3D unstable | Restart Civil 3D; avoid switching windows during form load |
| comboBox2 (Alignment) empty | Selected C3D document has no alignments | Select a different document or create an alignment in Civil 3D |
| comboBox3 (Profile) empty | Selected alignment has no attached profiles | Create a vertical profile in Civil 3D for the selected alignment |
| Elevation canvas is blank | No profile selected yet, or profile has no data points | Select comboBox3; ensure the profile has geometry |
| 3D string placed at wrong Z level | Using profile elevations when topo is expected, or vice versa | Clear the topo dropdown to use only profile Z; select topo to drape on terrain |
| Template not found error during RUN | No template selected in AutoBRIDGE global settings | Open AutoBRIDGE settings and select a family template before proceeding |
| Spline looks jagged / kinked | Interval too large relative to alignment curvature | Reduce the Interval Spacing (try 5 m or less on tight curves) |