I wish to change all configuration names with are "Default" to "00".
I have the recorded macro below which works on the open part. How can I modify this to run on all parts in a given folder?
Thanks in advance!
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
boolstatus = Part.Extension.SelectByID2("Default", "CONFIGURATIONS", 0, 0, 0, False, 0, Nothing, 0)
boolstatus = Part.EditConfiguration3("Default", "00", "", "", 36)
End Sub
SolidworksApi macros
Why don't you run it in the SOLIDWORKS Task Scheduler?
You can use #TASK tool to batch run your macro.
The example at this SolidWorks forum link might help you:
Both Dim longstatus As Long, longwarnings As Long are declared but never used?
I believe that is what SW macro recorder generated. You're saying it's ok to delete those variables?
Matlab is the closest I've ever come to programming.
Yes, it'd make your program cleaner and more understandable but it won't hurt to leave them there