New Features in the AutoCAD Civil 3D API

.NET Changes

This section covers changes to the AutoCAD Civil 3D .NET API for the 2017 release.

Corridors

  • A new API has been added for determining whether a corridor is created from feature line. The new API name is "IsFeatureLineBased", and you can invoke this API on objects of MgAeccOffsetBaseline and MgAeccBaseline. The API needs no input parameters, and will return a boolean value as a result. If the corridor is feature line based, then it will return true.
  • The following updates have also been made:
    Class Name API Name Change
    BaseBaseline SetAlignmentAndProfile If it is a feature line based corridor, it will fail to set the alignment and profile, and throws an exception whose description is "This operation on featureline-based baseline is invalid"
    OffsetBaseline AlignmentId::get If it is a feature line based corridor, it will return NULL, and throws an exception whose description is "This operation on featureline-based offset baseline is invalid"
    ProfileId::get If it is a feature line based corridor, it will return NULL, and throws an exception whose description is "This operation on featureline-based offset baseline is invalid"
    setAlignmentProfile If it is a feature line based corridor, it will fail to set the alignment and profile, and throws an exception whose description is "This operation on featureline-based offset baseline is invalid"
    isAlignmentDuplicateOnMainBaseline If it is a feature line based corridor, it will return false, and throws an exception whose description is "This operation on featureline-based offset baseline is invalid"
    Baseline AlignmentId::get If it is a feature line based corridor, it will return NULL, and throws an exception whose description is "This operation on featureline-based baseline is invalid"
    ProfileId::get If it is a feature line based corridor, it will return NULL, and throws an exception whose description is "This operation on featureline-based baseline is invalid"
    setAlignmentProfile If it is a feature line based corridor, it will fail to set the alignment and profile, and throws an exception whose description is "This operation on featureline-based baseline is invalid"

COM Changes

If you are using the COM API, you need to update the object version to 11.0 (from 10.5 used in AutoCAD Civil 3D 2016). 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 110.