2 Replies Latest reply on Oct 26, 2016 3:13 AM by Frank Wu Frank Wu

    Advanced Component Selection vba macro

    Frank Wu Frank Wu

      Does anyone know how to load a .xml external search file of Advanced Component Selection and run it by using the vba macro?

       

       

       

      11.bmp

       

      REF Code

       

      Dim swApp               As SldWorks.SldWorks

      Dim boolstatus          As Boolean

      Dim swModel             As SldWorks.ModelDoc2

      Dim swAssy              As SldWorks.AssemblyDoc

      Dim swASC               As SldWorks.AdvancedSelectionCriteria

      Sub Main()

      Set swApp = Application.SldWorks

      Set swModel = swApp.ActiveDoc

      Set swAssy = swModel

      Set swASC = swAssy.GetAdvancedSelection

      boolstatus = swASC.LoadCriteria("C:\Query.xml")

      swASC.Select

      End Sub