razzendahcuben
Mechanical
- Jan 10, 2009
- 79
Code:
Private sub main()
Dim swApp As SldWorks.SldWorks
Dim swDoc As ModelDoc2
Set swApp = Application.SldWorks
Set swDoc = swApp.ActiveDoc
'3 is the const value for IPS
swDoc.SetUserPreferenceIntegerValue swUnitSystem, 3
End sub
My default unit system is MMGS. When I run this macro and go into Tools-->Options-->Units it does have IPS selected. But the units in the document don't actually change---its still in MMGS.
Likewise, this does nothing either:
swDoc.SetUserPreferenceToggle swUnitSystem_IPS, True
What am I doing wrong? Thanks.