AnsweredAssumed Answered

How to get column Equation in BOM

Question asked by Yong Ning on Aug 19, 2017
Latest reply on Aug 22, 2017 by Manikandan Babu

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

 

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

Outcomes