Message 1 of 11

Not applicable
08-20-2018
11:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Sub DimPrecisionThree() Dim oDoc As DrawingDocument Set oDoc = ThisApplication.ActiveDocument Dim oDim As Object If oDoc.SelectSet.Count = 0 Then MsgBox "No dimension selected!" Exit Sub End If Dim oObjColl As ObjectCollection Set oObjColl = ThisApplication.TransientObjects.CreateObjectCollection 'Add selection to object collector Dim oObj As Variant For Each oObj In oDoc.SelectSet oObjColl.Add oObj Next Set oDim = oDoc.SelectSet(1) If oDim.Type = kLinearGeneralDimensionObject Or kOrdinateDimensionObject Then For Each oDim In oDoc.SelectSet oDim.Precision = 3 '##########Alternate unit precision goes here############### Next End If 'Re-select existing selection For Each oObj In oObjColl oDoc.SelectSet.Select (oObj) Next End Sub
Code changes precision of main unit on dimension. I do not know how to set precision to alternate unit on same dimension. This is equal to double clicking on dimension, then select second tab "Precision and tolerance" and change precision for "Alternate Unit".
Solved! Go to Solution.