1 Reply Latest reply on Nov 29, 2013 8:04 AM by Deepak Gupta

    Get SDDPRT "Material Name"

    Darren Smith

      Can anybody help???

       

      I am using the following code....

       

      Public Function GetPartData()
          Set swApp = Application.SldWorks

          Set swModel = swApp.ActiveDoc

          PartMaterial = swModel.MaterialIdName

       

      I am trying to get the part material (Brass, Steel, Gold etc)

       

      The Output from the line

       

      PartMaterial = swModel.MaterialIdName

       

      is

       

      Solidworks Materials/Plain Carbon Steel/9

       

      I know that I can use Mid$ etc to extract the material Plain Carbon Steel.

       

      Does anybody know an easier way to get to "Plain Carbon Steel etc"?

       

      Regards

       

      Darren