This content has been marked as final. Show 6 replies
Woops, sorry I missed that. Will try to get that to work first
You can also use BatchProcess to do exactly this; batch run any number of macros on files/folders/assemblies and their references, or custom lists
You can also check out Lenny's site:
for the PartNoProperty macro. He specifically tweaked one of his other macros so I could do exactly what you want above. That new macro is PartNoProperty.
If you are working in VBA, you need to learn about the File System Object. This object gives you access to drives, folders, and files. You can use it to enumerate files in a folder.
You will need to add a reference to MS Scripting Runtime library under Tools --> References in your VBA window.
here is another way
Dim Fold As String
Dim FileType As String
'Folder Name. Change to folder that has SolidWorks files
Fold = "C:\"
FileType = "*.*"
'This first time prints all files
'Prints all files that end with prt
FileType = "*.*prt"
Dim FileName As String
FileName = Dir(Fold & FileType)
Do While FileName <> ""
FileName = Dir