Under the Drawing Settings we have a list of abbreviations that Civil 3D will use on its reports, for instance. It is possible access that information from the CivilDocument Settings properties. The following code show, first, how list all abbreviations for Alignment Geometry Point Text and, second, access a specific one from the enumeration list. To change a abbreviation, simply use SetAlignmentAbbreviation instead.
<CommandMethod("listAbbrev")> _
Public Sub CmdListAbbreviations()
Dim ed As Editor = Application. _
DocumentManager.MdiActiveDocument.Editor
Dim civilDoc As CivilDocument = _
CivilApplication.ActiveDocument
Dim abbrev As SettingsAbbreviationAlignment = _
civilDoc.Settings.DrawingSettings. _
AbbreviationsSettings.AlignmentGeoPointText
' list all abbreviations for
' Alignment Geometry Point Text
Dim tpAbbrev As Type = GetType(AbbreviationAlignmentType)
Dim typesAbbrev As Array = [Enum].GetValues(tpAbbrev)
For Each tp In typesAbbrev
Dim value As String = abbrev.GetAlignmentAbbreviation(tp)
ed.WriteMessage("{0}{1}: {2}", _
vbNewLine, _
[Enum].GetName(tpAbbrev, tp), _
value)
Next
' so to access a specific one, let's
' say TangentSpiralIntersect, use:
Dim tsi As String = abbrev.GetAlignmentAbbreviation( _
AbbreviationAlignmentType.TangentSpiralIntersect)
End Sub