Hi @Anonymous. Yes, these things can be inspected by code. However, the things you are looking for are set at the DimensionStyle level, not necessarily at the individual dimension level. The DimensionStyle is just an initial starting place for creating a new dimension, but as you know, almost every aspect of individual dimensions can be overwritten or modified. Some of the style settings can be overwritten at the individual dimension level, and if they have been overwritten, you may not know about it by inspecting the original DimensionStyle itself. When just working with the most base class of all types of dimensions (the DrawingDimension object), you will not see its 'Style' property yet. There are several levels of more specific types of dimensions, and only the more specific object types have a Property for accessing the DimensionStyle.
The DimensionStyle object has tons of properties, but by the sounds of it, the following ones would be of interest to you:
Edit: Below is a brief code example.
Dim oDDim As DrawingDimension = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingDimensionFilter, "Pick Drawing Dimension.")
If oDDim Is Nothing Then Return
Dim oDimStyle As DimensionStyle = Nothing
Try : oDimStyle = oDDim.Style : Catch : End Try
If oDimStyle Is Nothing Then
MsgBox("No DimensionStyle obtained from selected dimension!", vbCritical, "iLogic")
Return
End If
Dim oDDoc As DrawingDocument = oDDim.Parent.Parent
Dim UOM As UnitsOfMeasure = oDDoc.UnitsOfMeasure
Dim sLinearUnits As String = UOM.GetStringFromType(oDimStyle.LinearUnits)
Dim sDisplayFormat As String = oDimStyle.DisplayFormat.ToString.TrimStart("k").Replace("Format", "")
Dim bUsingDecimalAngles As Boolean = oDimStyle.AngularFormatIsDecimalDegrees
MsgBox("DisplayFormat = " & sDisplayFormat & vbCrLf & _
"Linear Units = " & sLinearUnits & vbCrLf & _
"Angle As Decimal = " & bUsingDecimalAngles, vbInformation, "Dimension Inspection")
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Wesley Crihfield

(Not an Autodesk Employee)