.NET Changes in Autodesk Civil 3D
This section covers changes to the Autodesk Civil 3D .NET API for Autodesk Civil 3D.
New in 2024.4.3
Autodesk Construction Cloud
New in 2024.2
- Added support to create corridors based on feature lines by the API.
- CorridorCollection.Add(String corridorName, String baselineName, ObjectId featurelineId). This creates a corridor with a given corridor name, baseline name, and feature line.
- CorridorCollection.Add(String corridorName, String baselineName, ObjectId featurelineId, String baselineRegionName, ObjectId assemblyId). This creates a corridor with a given corridor name, baseline name, feature line, baseline region name, and assembly.
- BaselineCollection.Add(String baselineName, ObjectId feturelineId). This creates a baseline with a given baseline name and feature line.
- Baseline.SetFeatureLine(ObjectId featureLineId). This sets a baseline as feature line-based.
- OffsetBaseline.SetFeatureLine(ObjectId horizontalFeatureLineId, ObjectId verticalFeatureLineId). This sets the offset baseline as feature line-based.
- OffsetBaseline.FeatureLineIdVertical(). This gets the feature line object ID of an offset vertical baseline.
New in 2024.1
- Added support to import and export corridor transitions by the API.
- Baseline.ImportTransitions(String^ csvFileName)
- Baseline.ExportTransitions(String^ csvFilePath)
- Added .NET API support to get and set hydraulic properties of a pipe network structure.
- Added one property to Part:
Part.KnownFlow {get/set}
- Added three properties to Structure:
Structure.HydraulicGradeLine {get/set}
Structure.EnergyGradeLine{get/set}
Structure.KnownCapacity {get/set}
New in 2024
- Added an API to set corridor transitions to a baseline.
Reference API function Baseline.SetTransitions(IEnumerable<CorridorTransitionSet> transitionSets) to set all transition sets to a baseline.
One CorridorTransitionSet can be created by subassembly name or class name. The transition set's name, comment, and station lock status can also be set.
One CorridorTransition can be created by parameter name. The transition's start station, start value, end station, end value, and transition type can also be set.
- Added an API to get existing corridor transitions from a baseline.
Reference API function Baseline.getTransitions() to get all transition sets from a baseline.
Most of values can be retrieved.
You can get the transition set's name, comment, station lock status, and subassembly name type.
You can get the transitions' parameter name, start station, start value, end station, end value, transition type, and side info.
- Added the Subassembly.Status property which indicates whether the subassembly is up to date or not. This status corresponds to the icon shown before the subassembly node in the Toolspace.
- Added new APIs to create a simple turnout from a catalog, and then edit the turnout location, parameters, critical points, and so on.
Added methods to get, remove, and update turnout catalogs:
- TurnoutCatalog.Name (get)
- TurnoutCatalogManager.GetAllCatalogIds()
- TurnoutCatalogManager.AddCatalog(System::String^ path);
- TurnoutCatalogManager.GetCatalogByName(String^ name)
- TurnoutCatalogManager.UpdateCatalog(NAMESPACE_ACDB::ObjectId catalogId, System::String^ path)
- TurnoutCatalogManager.RemoveAllUnusedCatalogs();
- TurnoutCatalogManager.RemoveCatalog(NAMESPACE_ACDB::ObjectId catalogId);
- TurnoutCatalogManager.RemoveCatalogByName(String^ name);
- TurnoutCatalogManager.GetTurnoutCatalogManager(NAMESPACE_ACDB::Database^ db)
Added properties and methods to set the parameters that are necessary to create a turnout:
- TurnoutCreationParams.MainAlignmentId (set/get)
- TurnoutCreationParams.MainProfileId (set/get)
- TurnoutCreationParams.CatalogId (set/get)
- TurnoutCreationParams.TurnoutTypeName(set/get)
- TurnoutCreationParams.TurnoutModelName(set/get)
- TurnoutCreationParams.CustomParameterValues(set/get)
- TurnoutCreationParams.TurnoutDirection(set/get)
- TurnoutCreationParams.TurnoutSide(set/get)
- TurnoutCreationParams.InsertionPointEntry(set/get)
- TurnoutCreationParams.InsertionPoint(set/get)
- TurnoutCreationParams.ReferenceStation(set/get)
- TurnoutCreationParams.IsCreateDivertedProfiles(set/get)
- TurnoutCreationParams.TurnoutCreationParams(NAMESPACE_ACDB::Database^ db)
- TurnoutCreationParams.CreateDivertedAlignment(System::String^ entry)
- TurnoutCreationParams.AddMergedAlignment(System::String^ entry, NAMESPACE_ACDB::ObjectId alignmentId);
- TurnoutCreationParams.ClearMergedAlignment();
- TurnoutCreationParams.CreateDivertedProfile(System::String^ entry);
- TurnoutCreationParams.AddMergedProfile(System::String^ entry, NAMESPACE_ACDB::ObjectId profileId)
- TurnoutCreationParams.ClearMergedProfile()
Added properties and methods to get/set properties of a turnout and create a turnout:
- Turnout.CatalogId (get)
- Turnout.CatalogName(get)
- Turnout.TurnoutTypeName(get)
- Turnout.TurnoutModelName(get,set)
- Turnout.TurnoutSide(get,set)
- Turnout.TurnoutDirection(get,set)
- Turnout.AutomaticUpdate (get,set)
- Turnout.MainAlignmentId(get)
- Turnout.MainProfileId(get)
- Turnout.Create(System::String^ turnoutName, TurnoutCreationParams^ creationParams)
- Turnout.GetCustomParameters( )
- Turnout.GetCustomParameterValue(System::String^ name)
- Turnout.SetCustomParameterValue(System::String^ name, System::Object^ value)
- Turnout.GetDivertedAlignmentId(System::String^ entryName)
- Turnout.GetDivertedProfileId(System::String^ entryName)
- Turnout.GetCriticalPointType(System::String^ entryName, System::String^ criticalPointName)
- Turnout.GetCriticalPointStation(System::String^ entryName, System::String^ criticalPointName);
- Turnout.GetCriticalPointLocation(System::String^ entryName, System::String^ criticalPointName)
- Turnout.GetCriticalPoints(System::String^ entryName)
- Turnout.IsCriticalPointStationEditable(System::String^ entryName, System::String^ criticalPointName)
- Turnout.SetCriticalPointStation(System::String^ entryName, System::String^ criticalPointName, double station)
Added methods to get a turnout in the drawing or on a given alignment:
- Turnout.GetAllTurnoutIds(NAMESPACE_ACDB::Database^ database)
- Turnout.GetAllTurnoutIdsOnAlignment(NAMESPACE_ACDB::ObjectId alignmentId)
COM Changes
New in 2024
If you are using the COM API, you need to update the object version to 13.6 (from 13.5 used in Autodesk Civil 3D 2023). The objects and interfaces exposed have remained the same, but you should reference the new libraries, which are installed by default to: C:\Program Files\Common Files\Autodesk Shared\Civil Engineering 136.