7 Replies Latest reply on Aug 5, 2018 12:15 PM by Deepak Gupta

    How to let SW search folder for files given as list.

    Robert Voogt

      Hi all,

       

      I need Solidworks to have an input box and ask for a list of assembly names.

       

      I already have this code to find all assemblies in the folder, but I don't always need it to process all files. I would like to input a list of multiple assembly partnumbers.

       

      'FolderPath loop
              For Each subFolder In folder.SubFolders
          
                  ProcessFolder subFolder
          
              Next
              
              'Opening slddrw and run macro if not has been processed before
              For Each AsmFile In folder.Files
          
                  If InStr(LCase(AsmFile), "sldasm") > 0 Then         'sldasm has to be in lowercase
                      
                      DrawFile = Replace(AsmFile, "SLDASM", "SLDDRW")
      

       

      (the code looks for the slddrw file of the assembly already so I just need to input the name I guess.