Equations galore

Note: I completely rewrote and update this post. Read the new version here.

SolidWorks equations are underappreciated.

By using equations, you can make your model more adaptive to changes. You can make it smarter.

Furthermore, you can use equations to evaluate values or mathematical functions, suppress features or use them in custom properties. Even nested IF statements are a possibility.

Using equations to drive a model
Create a smart model using equations

Continue reading “Equations galore”

Customizing the bill of materials quantity

Parametric 3D CAD makes the life of the engineer so much better.

It doesn’t necessarily make it easier, nor does the first iteration of a design go much faster. But revisions will happen. And when they do, parametric designs will certainly be updated significantly quicker than 2D AutoCAD designs or drawings by hand.

But sometimes you just want to do something that was a piece of cake when drawn by hand. Adding a few milliliters of oil to the bill of materials (BOM) of a gearbox assembly  is such a matter.

It can be done however. I’ll show you how to do it manually and by using the API.

Continue reading “Customizing the bill of materials quantity”

How to fix non-functioning macro buttons

Macros can be great for replacing repetitive manual labor (usually in the form of mindless clicking) with robotized micro-tasks. If you can think of a task that you have to do often enough and if it can be standardized, you can probably automate it.

You can even add buttons to your SolidWorks toolbar. But sometimes they just stop working. I get a help request for this every week or so. Luckily the solution is very simple.

Macro buttons
My macro buttons

Continue reading “How to fix non-functioning macro buttons”

Solidworks VBA macro not saving?

This is some weird behavoir of SolidWorks that I have come to understand and accept over time. It might not even be SolidWorks’s fault, but that’s where I have encountered it and where it has bugged me so many times.

You may notice this non-saving behavior when you are working on a macro in Visual Basic for Applications, or VBA for short. You will click on save and you assume the macro has been stored for all eternity. Then you close the editor and you get the following pop-up:

Save your already saved changes?
Save your already saved changes?

Continue reading “Solidworks VBA macro not saving?”