BaselineRegion
class in Civil 3D represents a segment of a baseline, specified by alignment
stations for the start and end point. In a corridor, each baseline region uses
a single assembly type.
In AutoCAD
Civil 3D using UI tools we can add / remove BaselineRegion –
New API
functions are exposed in this release to add, remove or access a BaselineRegion
in the class BaselineRegionCollection.
Here is a C#
.NET code snippet which shows how to add and remove BaselineRegion –
// BaselineRegionCollection.Add(string regionName, string assemblyName, double startStation, double endStation )
// Adds a region at the specified start and end station with the given name and assembly.
// Get the BaselineRegionCollection
BaselineRegionCollection baselineRegionColl = corridor.Baselines[0].BaselineRegions;
// Add a new BaselineRegion
BaselineRegion baselineregion = baselineRegionColl.Add("My Added Region", "Assembly - (1)", 506.00, 1110.00);
// Remove a BaselineRegion with a given Name
baselineRegionColl.Remove("Corridor Region (2)");
//rebuild the corridor
corridor.Rebuild();
Once added
the newly created BaselineRegion will be shown under the Baseline –



Leave a Reply