SolidWorks utilizes VBA (Visual Basic) to automate certain tasks
For beginners, the easiest way is to use the macro recorder to record a set series of actions
For intermediates, the internet provides a source for 90% of tasks that would be automated
For advanced users, VBA is a pretty simple language to master and allows for some pretty complicated tasks to be achieved within SolidWorks/Windows
Menu Bar→Tools→Macro→Record→LMB The Record/Pause button on the Macro Pop Up Toolbar
Press the STOP button when you believe all the tasks have been recorded
Save the Macro *.SWP in a folder (C:/.../MACROS is a good folder to have)
Menu Bar→Tools→Macro→Run...→Select the appropriate *.SWP file
Menu Bar→Tools→Macro→Run...→Select the appropriate *.SWP file
This will open a separate program which is the Visual Basic Editor
Contained in this will be the code that was recorded. Not 100% of the actions you take will be recorded and often not exactly as you'd intend. This is where the internet comes in handy to fill in any gaps that might not have been inserted.
If you macro has errors, you can sometimes troubleshoot by stepping through each line of code in the macro by pressing the F8 key
Save the file
Macro files are *.SWP
Once satisfied with the function of the macro, add it to your Command Manager
RMB Command Manager→Customize→Commands→Macro→Macro Button→Navigate to the appropriate *.SWP file→Select
OPTIONAL: You'll want to get good at creating custom icon files. These are .BMP images