.NET Changes in Autodesk Civil 3D 2021.3
This section covers changes to the Autodesk Civil 3D .NET API for Autodesk Civil 3D 2021.3.
Cross Sections
- 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.
.NET Changes in Autodesk Civil 3D 2021.1
Catchments
- Added the ability to access catchment properties. This includes the following get/set properties and methods:
- Catchment::Area2d
- Catchment::Perimeter
- Catchment::DischargePoint
- Catchment::Exclusionary
- Catchment::RunoffCoefficient
- Catchment::ReferencePipeNetworkId
- Catchment::ReferencePipeNetworkStructureId
- Catchment::ReferenceSurfaceId
- Catchment::TimeOfConcentration
- Catchment::TimeOfConcentrationMethod
- Catchment::ContainingGroupId
- Catchment::CurveNumber
- Catchment::HydrologicalSoilGroup
- Catchment::AntecedentWetness
- Catchment::ImperviousArea
- Catchment::UnconnectedImperviousArea
- Catchment::HydrologicallyMostDistantPoint
- Catchment::HydrologicallyMostDistantLength
- Catchment::ManningsCoefficient
- Catchment::SetFlowPath (previously only GetFlowpath was available)
- Added a new CatchmentGroup class. The class includes the ability to create catchment groups, and to move catchments to/from groups. Methods include:
- CatchmentGroup::GetCatchmentId(name)
- CatchmentGroup::Create
- CatchmentGroup::GetAllCatchmentIds()
- CatchmentGroup::AddCatchmentId(id)
- CatchmentGroup::RemoveCatchmentId(id)
- CatchmentGroup::RemoveAllCatchments()
Feature Lines
- Feature lines can nowset points in absolute/relative mode with regards to a surface. New properties and methods include:
- FeatureLine::RelativeSurfaceId
- FeatureLine::IsElevationRelativeToSurface
- FeatureLine::GetPointRelativeElevation
- FeatureLine::SetPointRelativeElevation
Profiles
Quantity Takeoff
- The QTOUtility class now has added methods to handle QTO Reports. Reports can be generated by first creating an XML report (detailed/summary) and provide additional transformation steps to convert the XML to other formats (such as html, csv, and txt) using the XSL templates available in Civil3D. The new methods include:
- QTOUtility::GenerateXMLReport()
- QTOUtility::TransformXMLReport()
- QTOUtility::DrawXMLReport()
Section Views
- Added the ability to create and manipulate section views in a drawing.
Superelevation Views
- Added the ability to create and manipulate SuperelevationViews. Methods and properties include:
- SuperelevationView::Create()
- SuperelevationView::StationStart/StationEnd
- SuperelevationView::Location()
- SuperelevationView::GetStationAndCrossSlope
- SuperelevationView::CreatePolyline
Surfaces
- Added the ability to select a surface and change it to a solid. These additions replicate the behavior of the SurfaceToSolids extension. The methods include:
- TinSurface::CreateSolidsAtDepth
- TinSurface::CreateSolidsAtDepthToFile
- TinSurface::CreateSolidsAtFixedElevation
- TinSurface::CreateSolidsAtFixedElevationToFile
- TinSurface::CreateSolidsAtSurface
- TinSurface::CreateSolidsAtSurfaceToFile
.NET Changes in Autodesk Civil 3D 2021
Pressure Networks
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.