With the file extension SWB, basic macro files of the 3D CAD software SolidWorks are identified. Swb files are text files that contain Visual Basic 3 code that executes commands from SolidWorks when executed. For example, mechanical components can be implemented using a SWB file. You can use the Tools -> Macros -> Execute and select a SWB file to process the macros.
Alternatively, you can drop the SWB file from the Windows Explorer via drag-and-drop method to a free working area of SolidWorks (no open document). Swb files are also compatible with older versions of SolidWorks. Newer so-called VBA projects have the extension swp.