6 Replies Latest reply on Mar 13, 2018 4:58 PM by Jesse Meiring

    Modifying Document Properties in a Part

    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