1 Reply Latest reply on Dec 12, 2013 8:03 AM by Deepak Gupta

    Get the part number of a part inserted into a SLDDRW

    Darren Smith

      Can anybody help??


      I have the following macro....


          Set swApp = Application.SldWorks


          Dim oDoc As SldWorks.ModelDoc2
          Set oDoc = swApp.ActiveDoc
          If oDoc.GetType = 3 Then
             PartNumber = ??????


          End If


      If checks to see if the open document is a "SLDDRW" file.  (this part works OK)


      What I need, is to know the part number of the "SLDPRT" that has been inserted into the "SLDDRW" drawing (Bold Text), not a "SLDASM" file.


      Is this possible????


      Many thanks in advance!!!