I'm attaching a sample set of model and drwing with several broken dimensions on several views with different scale.
I still hope somebody will help me to make VS (View Scale) variable an accosiative.
My current code is:
Sub Main
Dim oIDW As DrawingDocument = ThisApplication.ActiveDocument
Dim oSh As Sheet = oIDW.ActiveSheet
Dim oDD As DrawingDimension
Dim MsgMody As String
Dim VS As Double ' View Scale
For Each oDD In oSh.DrawingDimensions
MsgBody &= oDD.Text.Text
' MsgBody &= oDD.ModelValue
VS = 1/2 ' !!!!
Dim d As Double = OnIDWdistMM(oDD.DimensionLine.StartPoint.Y, oDD.DimensionLine.StartPoint.X, oDD.DimensionLine.EndPoint.Y, oDD.DimensionLine.EndPoint.X) / VS
MsgBody &= " (" & Round(d,3) & ")" '
If Round(d,8) <> Round(10*oDD.ModelValue,8) Then MsgBody &= " - BROKEN !!!"
MsgBody &= vbCrLf
Next
MsgBox(MsgBody,,"Dimensions' Break status:")
End Sub
Function OnIDWdistMM(ya As Double, xa As Double, yb As Double, xB As Double)
OnIDWdistMM = 10 * Sqrt((ya - yb) ^ 2 + (xa - xB) ^ 2)
End Function