AnsweredAssumed Answered

Modifying Document Properties in a Part

Question asked by Jesse Meiring on Mar 13, 2018
Latest reply on Mar 13, 2018 by Jesse Meiring

I keep finding this same line used to accomplish this task but I always get a Object Variable not set error:

 

Dim swApp As Object

Dim ModelDocExtension As ModelDocExtension

Dim Part As Object

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

Dim instance As IModelDocExtension

Dim Units As Integer

 

 

Sub main()

 

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

boolstatus = instance.SetUserPreferenceInterger(swUserPreferenceIntegerValue_e.swUnitsLinearDecimalPlaces,swUserPreferenceOption_e.swDetailingNoOptionSpecified, 3)

 

End Sub

Outcomes