1 Reply Latest reply on Aug 27, 2013 11:09 AM by Pierre Vergneault

    Is It possible to edit custom file properties (PartNo) using a Macro?

    Jason Turner

      Hello Everybody,

       

      I'm trying to change the part numbering system of a large part-database and I want to know if anyone knows of a "File.Properties.Custom.PartNo" object/property/method (or anything like that) that I can manipulate within a module.

       

      Thanks for your help in advance.

       

      -J-

        • Re: Is It possible to edit custom file properties (PartNo) using a Macro?
          Pierre Vergneault

          Hi,

           

          Here is a code to assign the same value to each custom property. I hope it will help

           

          Dim CustPropMng As SldWorks.CustomPropertyManager

          Dim LeComposant As ModelDoc2

          Dim ConfigName as String

          Dim CustPropNames As Variant

           

          Set LeComposant = ......................

          Set CustPropMng = LeComposant.Extension.CustomPropertyManager(ConfigName)

          CustPropNames = CustPropMng.GetNames

           

          For J = 0 To UBound(CustPropNames)

                        LeComposant.CustomInfo2(ConfigName, CustPropNames(J)) = "Your Value"

                        msgbox CustPropNames(J)

          next J

           

          Pierre