@GeorgK,
Dimensions also can be created using 3D model annotations. Hoping that below VBA code may be helpful instead of client graphics.
Sub 3DLinearDimensions()
Dim doc As PartDocument
Set doc = ThisApplication.ActiveDocument
Dim oDef As PartComponentDefinition
Set oDef = doc.ComponentDefinition
Dim oAnnotationFace As Face
Set oAnnotationFace = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face to add Model linear dimension")
Dim oAnnotationPlaneDef As AnnotationPlaneDefinition
Set oAnnotationPlaneDef = oDef.ModelAnnotations.CreateAnnotationPlaneDefinitionUsingPlane(oAnnotationFace)
' Set a reference to the TransientGeometry object.
Dim oTG As TransientGeometry
Set oTG = ThisApplication.TransientGeometry
Dim oPt As Point
Set oPt = oTG.CreatePoint(3, 3, 3)
Dim oCenterOfMass As Point
Set oCenterOfMass = oDef.MassProperties.CenterOfMass
Dim oWpt As WorkPoint
Set oWpt = oDef.WorkPoints.AddFixed(oCenterOfMass)
Dim oFace As Face
Set oFace = ThisApplication.CommandManager.Pick(kPartFaceFilter, "Select a face")
Dim oIntent1 As GeometryIntent
Set oIntent1 = oDef.CreateGeometryIntent(oFace)
Dim oIntent2 As GeometryIntent
Set oIntent2 = oDef.CreateGeometryIntent(oWpt)
Dim oLinearDimDef As LinearModelDimensionDefinition
Set oLinearDimDef = oDef.ModelAnnotations.ModelDimensions.LinearModelDimensions.CreateDefinition(oIntent1, oIntent2, oAnnotationPlaneDef, oPt, kVerticalDimensionType)
Dim oLinearDim As LinearModelDimension
Set oLinearDim = oDef.ModelAnnotations.ModelDimensions.LinearModelDimensions.Add(oLinearDimDef)
End Sub
To demonstrate, a screencast is prepared and uploaded to below link.
https://autode.sk/2Jz7lmD
Thanks and regards,
CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network