AnsweredAssumed Answered

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

Question asked by Robert Voogt on Jun 21, 2018
Latest reply on Aug 5, 2018 by Deepak Gupta

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
        '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.