0 Replies Latest reply on Nov 27, 2014 4:39 AM by Antonio Alvarez Arauzo

    How can I put more than one weldment cut list with API

    Antonio Alvarez Arauzo

      Hello, it´s `possible to put more than one cut list weldment with api?, manually you can put more than one cut list, but with a macro no. even if a table already exists not insert another.

       

      Option Explicit
      Const WeldmentTableTemplate As String = "C:\Program Files\SolidWorks Corp\SolidWorks\lang\english\cut list.sldwldtbt"

      Sub Main()
        Dim swapp As SldWorks.SldWorks
        Dim oDrawing As DrawingDoc
        Dim swView As View
        Dim WMTable As SldWorks.WeldmentCutListAnnotation

        Set swapp = Application.SldWorks
        Set oDrawing = swapp.ActiveDoc
        Set swView = oDrawing.GetFirstView
        Set swView = swView.GetNextView

        ' Insert the weldment cut list table

       

      'FIRST TABLE: RESULT OK
        Set WMTable = swView.InsertWeldmentTable(False, 0.1996662889191, 0.1013905859662, swBOMConfigurationAnchor_TopLeft, "", WeldmentTableTemplate)
       

      'SECOND TABLE: NO OK

        Set WMTable = swView.InsertWeldmentTable(False, 0.1996662889191, 0.1013905859662, swBOMConfigurationAnchor_TopLeft, "", WeldmentTableTemplate)

       

        End Sub