For my training new version of Autodesk Inventor I made Lego ipart. This one part have four variants of shape and many dimension. First time I made chapel.
Showing posts with label AI2016. Show all posts
Showing posts with label AI2016. Show all posts
Mass units in iLogic
My variation of way to get a mass to a drawing. This macro for iLogic solve the problem of different units "kg" and "g". May by next time I add libra unit. I used this because this way solve mass only before save model, not with every change.
Select Case ThisDoc.Document.UnitsOfMeasure.Massunits
Case 11283 'kilogram If iProperties.Mass > 0.1 Then iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass,2) & " kg" Else iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass * 1000) & " g" End If Case 11284 'gram If iProperties.Mass > 100 Then iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass / 1000,2) & " kg" Else iProperties.Value("Custom", "Hmotnost") = Round(iProperties.Mass) & " g" End If End Select
Subscribe to:
Posts (Atom)

