1 Reply Latest reply on Mar 23, 2014 9:23 PM by Artem Taturevych

    How to set specific configurations with API

    Yong Ning

      Apply custom properties to specific configurations in the active part or assembly document.

       

      a1.jpg

       

       

       

      With Api  set specific configuations

       

      a2.jpg

       

      2012 SolidWorks API Help - Get Custom Properties of Referenced Part (VBA)

      http://help.solidworks.com/2012/English/api/sldworksapi/Get_Custom_Properties_of_Referenced_Part_Example_vb.htm

       

      Sub ll()
        Dim SwModel As ModelDoc2
        Set SwModel = Application.SldWorks.ActiveDoc
        Dim swCustProp As CustomPropertyManager
        Set swCustProp = SwModel.Extension.CustomPropertyManager("") ' .CustomPropertyManager("")
        swCustProp.Add "Mass", swCustomInfoType_e.swCustomInfoText, "MyValue"
        swCustProp.Set "Mass", "MyValue"


      Stop

       

      End Sub

       

       

      SolidWorks Forums: API - How to change configuration name?

      https://forum.solidworks.com/thread/78124?