Does anyone have a execution file that will go into a folder and update all parts therein by applying "Remove All Part Appearances"? And then set all parts in that folder to a specific SW color? I have looked through past posts but nothing quite fits the bill.
James,
You don't need an .exe. Just specify the folder in the constant strFolderPath (currently set to "C:\test\") before you run the macro:
======
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim strFileName As String
Const strFolderPath As String = "C:\test\"
Sub main()
Set swApp = Application.SldWorks
strFileName = Dir(strFolderPath & "*.SLDPRT")
While strFileName <> ""
Set swModel = swApp.OpenDoc6(strFolderPath & strFileName, swDocPART, 1, Empty, Empty, Empty)
swModel.Extension.RemoveMaterialProperty swAllConfiguration, Nothing
swModel.EditRebuild3
swModel.Save3 swSaveAsOptions_Silent, Empty, Empty
swApp.QuitDoc swModel.GetTitle
strFileName = Dir
Wend
End Sub
======
I added this macro (called "Remove appearances from all parts in a folder") to the Macro Library at my web site, by the way, in case you want to download the .swp.
Keith
Video Tutorials for the SolidWorks API