6 Replies Latest reply on Jul 28, 2016 3:12 PM by Amen Allah Jlili

    Custom Property from Assembly while in drawing.

    Philip Hopping

      How would I get a configuration specific custom property value from an assembly ("P_Number"). I can get it from a part, but not an assembly. Here is my code for the part that works:

       

       

      Set swApp = Application.SldWorksSet swmodel = swApp.ActiveDoc

      Set swdraw = swmodel

      Set swview = swdraw.GetFirstView

      Set swview = swview.GetNextView

      Set config = swmodel.GetActiveConfiguration

      v = swview.GetVisibleComponents

      Set comp = v(0)

      Set swmod = comp.GetModelDoc2

      Propname = swmod.GetCustomInfoNames

      config = swview.ReferencedConfiguration

      Dim configs As Variant

      Set swCustPropMgr = swmodel.Extension.CustomPropertyManager("")

      evval1 = swmod.GetCustomInfoValue(config, "P_Number")

       

       

      evval1 keeps returning as " "