4 Replies Latest reply on Jan 16, 2018 6:15 PM by Jonathan Westcott Branched from an earlier discussion.

    Macro is changing custom properties in both files

    Deepak Gupta

      Try these codes

       

      Option Explicit
      Dim swApp As SldWorks.SldWorks
      Dim swModel As SldWorks.ModelDoc2
      Dim swCustProp As SldWorks.CustomPropertyManager
      Sub main()
          Set swApp = Application.SldWorks
          Set swModel = swApp.ActiveDoc
          Set swCustProp = swModel.Extension.CustomPropertyManager("") 'Add config name in the quotes if you want configuration specific property
          swCustProp.Add3 "Description", 30, "Test 123", 1 ' Change property name as needed
      End Sub