08-29-2023
05:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
08-29-2023
05:12 AM
Hi @keithc03GZXH6 . Please try this code:
Sub main
Dim oDoc As Document = ThisDoc.Document
If TypeOf oDoc Is AssemblyDocument Then
For Each oRefDoc As Document In oDoc.AllReferencedDocuments
If Not oRefDoc.IsModifiable Then Continue For
ChengeLengthDisplayPrecision(oRefDoc.UnitsOfMeasure, 1)
Next
Else If TypeOf oDoc Is PartDocument Then
Dim oPartDoc As Document = oDoc
If Not oPartDoc.IsModifiable Then Exit Sub
ChengeLengthDisplayPrecision(oPartDoc.UnitsOfMeasure, 1)
End If
End Sub
Private Function ChengeLengthDisplayPrecision(ByVal oUOfM As UnitsOfMeasure,
ByVal i As Integer)
oUOfM.LengthDisplayPrecision = i
End Function
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.