05-27-2021
12:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
05-27-2021
12:09 AM
Hi.
Thanks very much for your response. This did the trick!
My units are mm so I just changed the 499.4 to 49.94 and bingo! I wasn't aware of the units issue so thanks for that.
This is how the code finished up:
Sub Main Dim oDoc As DrawingDocument = ThisDoc.Document Dim oSheet As Sheet = oDoc.ActiveSheet For Each oDim As DrawingDimension In oSheet.DrawingDimensions If oDim.ModelValue <= 49.94 Then If Round(oDim.ModelValue * 10, 1) -Round(oDim.ModelValue * 10, 0) = 0 Then oDim.Precision = 0 Else oDim.Precision = 1 End If Else oDim.Precision = 0 End If Next End Sub
Thanks very much for your help!
Cheers,
T