1 Reply Latest reply on Apr 7, 2014 11:51 PM by Yong Ning

    How to get cell parametrically?

    Yong Ning

      aa2.jpg

       

       

      This cell value is parametrically linked to a part or assembly document. Manually overriding the value will sever this link.

      Help me . get cells link parameter to a part or assembly document.

        • Re: How to get cell parametrically?
          Yong Ning

          Follow code is get bom text. don't read cell link parametrically linked to a part or assembly

           

          Sub main()

              Dim swApp                   As SldWorks.SldWorks

              Dim swModel                 As SldWorks.ModelDoc2

              Dim swSelMgr                As SldWorks.SelectionMgr

              Dim swBomTable              As SldWorks.BomTableAnnotation

              Dim SwBomFeat As BomFeature, SwTableAnnotation As TableAnnotation

              Dim vTableAnnotations

              Dim ss, tmp, Str, ii, jj

           

           

              Set swApp = Application.SldWorks

              Set swModel = swApp.ActiveDoc

              Set swSelMgr = swModel.SelectionManager

              Set SwBomFeat = swSelMgr.GetSelectedObject2(1)

              ss = SwBomFeat.GetTableAnnotations

              Set SwTableAnnotation = ss(0)

           

           

              With SwTableAnnotation

                For ii = 0 To .RowCount

                  For jj = 0 To .ColumnCount

                     Debug.Print .Text(ii, jj), ",";

                  Next jj

                  Debug.Print

                Next ii

              End With

          End Sub

           

          result is