.NET Changes in Autodesk Civil 3D 2022.2
This section covers changes to the Autodesk Civil 3D .NET API for Autodesk Civil 3D 2022.2.
Bridge
.NET Changes in Autodesk Civil 3D 2022.1
This section covers changes to the Autodesk Civil 3D .NET API for Autodesk Civil 3D 2022.1.
Cant
- Added an API call to get the properties of cant data at critical stations (EquilibriumCant, CantDeficiency, CantGradient, VerticalSpeed, LateralAcceleration).
Corridors
-
Added a new .NET API, CorridorCollection.RebuildAll(), which can build all corridors in the drawing and consider their dependencies.
Cross Sections/Section Views
- Method: SectionViewGroupCollection::Add(Point3d, Double, Double, SectionViewGroupCreationRangeOptions, SectionViewGroupCreationPlacementOptions, SectionDisplayOptionCollection, NAMESPACE_ACDB::ObjectId, NAMESPACE_ACDB::ObjectId): Adds a SectionViewGroup which will create multiple SectionViews within a specified station range of an alignment.
- Property: Section::StyleId: Gets or sets the section StyleId.
- Class: GraphDisplayOption: The base class for graph display option.
- Class: GraphDisplayOptionCollection: Represents the collection of all graph display options used for a graph.
- Class: SectionDisplayOption: Used to change the section display options according the section source.
- Class: SectionDisplayOptionCollection: Represents the collection of all section display options used for a graph.
- Method: SectionViewGroup::UpdateLayout(): Updates the layout of the current SectionViewGroup to reset the location of section views.
- Method: SectionViewGroup:: ImportLabelSetForSectionsInGroup(SectionSource, NAMESPACE_ACDB:: ObjectId): Imports the label objects in the label set to section views in this group
- Method: SectionViewBandSet::ImportBandSetStyle(NAMESPACE_ACDB::ObjectId bandSetId): Imports an existing band set style to the current graph.
- Method: SectionView:: GetSectionViewGroup(): Gets the SectionViewGroup of current SectionView.
- Property: SectionView:: SampleLineId: Gets the ObjectId of the sample line id
- Property: SectionView:: SectionViewGroupName: Gets the name of the section view group
- Class: SectionCorridorPointLabelGroup: Represents a section corridor point label group.
- Method: SectionView:: GetSectionCorridorPointLabelGroupIds(): Gets the ObjectIdCollection of all the SectionCorridorPointLabelGroup objects in the section view.
- Property: LabelStylesSectionRoot:: CorridorPointLabelStyles: Gets the collection of all section corridor point label styles.
- Enumeration: LabelStyleType:: SectionCorridorPoint
- Property: Section::CorridorSurfaceId: Gets the corridor surface object ID.
- Property: FeatureLine::CurvesCount: Gets the count of the feature line curves.
- Method: FeatureLine::SetCurveRadius(int index, double radius): Sets the radius at the index of the feature line's curve.
- Method: SampleLineGroup::ReportQuantities(): Generate quantities report for a group of sample lines.
- Method: FeatureLine::GetCurveRadius(int index): Gets the radius at the index of the feature line's curve.
Data shortcuts
- Class: DataShortcutKey: Represents data shortcut information.
- Method: Entity::GetReferenceInfo(): For a reference entity(IsReferenceObject = true), gets its reference information. Returns the DataShortcutKey which contains the information of the referenced object.
- Method: DataShortcuts:: RepairBrokenDS RepairBrokenDRef(ObjectId brokenDRefId, System::String^ targetDwgFullPath, bool autoRepairOther); : Updates the broken entity's referenced drawing path with the target drawing path.
- Method: bool RepairBrokenDataShortcut(int index, System::String^ targetDwgFullPath, bool autoRepairOther);: Used to repair a broken data shortcut.
- Enumeration: DataShortcuts::RefType: The available data shortcut entity types.
- Method: DataShortcuts::CreateReference(): Creates Data Reference entity at host drawing according to database, entity name, and entity type of source drawing.
- Method: DataShortcutManager::CreateReference(): Creates a Data Reference entity at host drawing according to database, entity name, and entity type of source drawing.
- Method: DataShortcuts:: GetDSProjectId (): Gets data shortcut project id according to project path.
- Method: DataShortcuts:: AssociateDSProject (): Associates a data shortcut project to the current drawing.
Superelevation Views
-
Added a new API to set superelevation view styles: SuperElevationView::StyleId::set.
COM Changes
If you are using the COM API, you need to update the object version to 13.4 (from 13.3 used in Autodesk Civil 3D 2021). 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 134.