Reg : Macro (modification)

Reg : Macro (modification)

naresh_kalyan
Advocate Advocate
232 Views
1 Reply
Message 1 of 2

Reg : Macro (modification)

naresh_kalyan
Advocate
Advocate
Dear all,
Please help me in writing a code to get Decimal Values of all Dimensions whichever is having. Today, I gone through one Program which is in Sample Programs.
I just made slight changes but still it is not working.
I am sending the macro which I came across. Is

Public Sub EditDrawingDimensions()
' Set a reference to the drawing document.
' This assumes a drawing document is active.
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument

'Set a reference to the active sheet.
Dim oSheet As Sheet
Set oSheet = oDrawDoc.ActiveSheet

Dim counter As Long
counter = 1

Dim oDrawingDim As DrawingDimension
For Each oDrawingDim In oSheet.DrawingDimensions


Next


' Set a reference to the dimension style of that dimension.
Dim oDimStyle As DimensionStyle
Dim oDimStyleLinearPrecision As LinearPrecisionEnum

' Modify some properties of the dimension style.
' This will modify all dimensions that use this style.

If oDimStyleLinearPrecision = 41730 Then
LenearPrecision = kOneDecimalPlaceLinearPrecision

Else
If oDimStyleLinearPrecision = 41731 Then
LenearPrecision = kTwoDecimalPlacesLinearPrecision

Else
If oDimStyleLinearPrecision = 41732 Then
LenearPrecision = kThreeDecimalPlacesLinearPrecision

Else
If oDimStyleLinearPrecision = 41733 Then
LenearPrecision = kFourDecimalPlacesLinearPrecision
End If
End If
End If
End If

End Sub

Thanks to your time.
Kalyan
0 Likes
233 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Greetings.
I tried out the macro.
I think it might not be possible to control specific dimension's precision thru program.
If so, it is a good one really.

Wilde
0 Likes