1 Reply Latest reply on Aug 22, 2017 5:37 AM by Manikandan Babu

    How to get column Equation in BOM

    Yong Ning

      In Solidworks 2012

       

       

      BOM.jpg

      Help me, How to get equition------IF(`Dn`=159;`Dn`;`Dn`)

       

      follow code, don't find equition?

       

       

       

      Sub del()

         Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

              Set SwApp = Application.SldWorks

              Set SwModel = SwApp.ActiveDoc

         Dim SwSelMgr As SelectionMgr, ii, jj

              Set SwSelMgr = SwModel.SelectionManager

         Dim SwTabAnn As TableAnnotation, SwBomTab As BomTableAnnotation

              Set SwTabAnn = SwSelMgr.GetSelectedObject5(1)

              Set SwBomTab = SwTabAnn

              With SwTabAnn

                  For jj = 0 To .ColumnCount

                     Debug.Print .Text(0, jj),

                     Debug.Print .GetColumnTitle(jj),

                     Debug.Print SwBomTab.GetColumnCustomProperty(jj),

                     Debug.Print SwBomTab.GetColumnUseTitleAsPartNumber(jj)

                  Next jj

              End With

              ss = SwBomTab.GetAllCustomProperties

      End Sub

       

      ************************