1 Reply Latest reply on Jan 11, 2017 11:29 AM by Amen Allah Jlili

    Get layer of BOM in API

    Chris Christy

      I need to get the layer of the BOMs in my drawing and then run some code if the Bom is on the English Layer. I can't seem to find how to get the layer. Here is the code where I get the name of the BOMs.


          'Get BOM name

          Do While Not swFeat Is Nothing

              If "BomFeat" = swFeat.GetTypeName Then

                  Set swbomfeat = swFeat.GetSpecificFeature2

                  Set swBOM = swbomfeat.GetFeature

                  sBOMname = swBOM.Name

                  Debug.Print swBOM.Name

                  Exit Do

              End If

              Set swFeat = swFeat.GetNextFeature




      Thanks in advance.


      Chris C.