SOLIDWORKS - .SWB/.SWP file; Now what?

So, you downloaded this file from a vendor and it’s not anything that you recognize. If you double click on it, nothing happens. So, what is it?

This file type is a SOLIDWORKS Macro. A Macro is defined as a single instruction that expands automatically into a set of instructions to perform a particular task. What’s neat about these files is that a vendor can give you these files instead of a SOLIDWORKS file. It doesn’t limit you or them into a specific version. So, I can create a macro in 2019 that builds my part, then give it to someone that’s running an earlier version. They run the Macro, it builds the part in their version of SOLIDWORKS with the full feature tree. Another use case might be the size of the file. It might be easier to Email a macro file that’s a few KB of code in a zip file than Emailing a few MB of the actual model. Of course, this is something to think about on a case by case basis.

, SOLIDWORKS – .SWB/.SWP file; Now what?

, SOLIDWORKS – .SWB/.SWP file; Now what?

Macros can be simple or complex. Some will build the part with no input from the user, others might have some inputs that need to be filled out before it can run correctly.

, SOLIDWORKS – .SWB/.SWP file; Now what?

Now that we’ve scratched the surface as far as some of the benefits and what macros are, how do we import a .SWB?

One way is to take your .swb/.swp file (You will have to unzip it if it comes that way) and drag and drop it into the blank SOLIDWORKS program.

The second way is to start SOLIDWORKS and go to TOOL>Macros>RUN. Then go select your file and open it.

, SOLIDWORKS – .SWB/.SWP file; Now what?

If this is something that you want to get into, SOLIDWORKS has a 3day course that goes into the Fundamentals of SOLIDWORKS API.

Craig Maurer
Applications Engineer
Computer Aided Technology, LLC

  • Share this
Find Your Design Solution in the CATI Store.
Browse Products