1 Reply Latest reply on Jan 12, 2015 11:57 AM by Deepak Gupta

    API to change "Use template settings" for tables in drawings

    David Dewey

      Hello,

      I am curious if there is a method for changing this setting via a macro?

      Capture.PNG

        • Re: API to change "Use template settings" for tables in drawings
          Deepak Gupta

          In API help search/look for swUserPreferenceToggle_e.swDetailingTablesUseTemplateSettings

           

          Here are the macro codes if you need them:

          Option Explicit

          Sub main()

              Dim swApp                       As SldWorks.SldWorks

              Dim swModel                     As SldWorks.ModelDoc2

             

              Set swApp = Application.SldWorks

              Set swModel = swApp.ActiveDoc

             

              'Changing True to Flase will set off the option

              swModel.Extension.SetUserPreferenceToggle swUserPreferenceToggle_e.swDetailingTablesUseTemplateSettings, _

              swUserPreferenceOption_e.swDetailingNoOptionSpecified, True

          End Sub