Everyone is familiar with the notion that SolidWorks part, assembly, and drawing file need to rebuilt from time to time. But do you know why? And do you know about the "other" rebuild command? A SolidWorks file consists of essentially four sections. The first section is the header, which is common to all windows files. The second section, though, is the instruction set.
The instruction set tells SolidWorks what to build and how to build it. Think of it as the FeatureManager in binary. The instruction set changes over time as you add, delete, and change features in the model. Add a fillet? It gets a marker in the tree and it's added to the instruction set. Change the depth of an extruded cut? The instruction of that cut gets modified.
The changes to the instruction set are executed by the Rebuild command. The rebuild command goes through the instruction set, starting at the top. If it runs into an instruction that has changed, the rebuilder executes that feature. If the builder sees a feature that has not been changed since the last build, it ignores it and moves on to the next instruction.
This means that only features that have changed since the last build are actually executed when the Rebuild command is run. Features that have changed rebuild, features that have not changed are not rebuilt. This keeps things moving along nicely because the smart Rebuild command only uses resources and takes time to build items that need it.
Sometimes, this isn't enough. Let's say some geometry in the model gets corrupted. That would be in the third section, the database. That's the geometry created by the instruction set: faces, edges, vertices. etc. If there's a corruption in the database, that corruption can be easily fixed by having the modeling engine redo the database. The problem is this: since the Rebuild command only builds features that have had their instruction changed, the builder never build the feature in question unless you happen to have changed it since the corruption occurred.
Luckily, SolidWorks has another build command called Forced Rebuild. This is the command to use when you want SolidWorks to rebuild every single item in the instruction set, in order, and therefore refresh the entire database of geometry and the graphics. Unfortunately, there is no obvious way to execute a Forced Rebuild as there is no menu choice nor tool button. There is only a keyboard shortcut which is this: CTRL-Q.
Since file corruption can occur due to a myriad of reason (dropped bits across the network, media sectors going bad, and so on), it is a very good practice to always do a Forced Rebuild (CTRL-Q) on a model at least once: before you say you're done. At the very least, part of your release procedure should be performing a CTRL-Q. I'd do it more often myself, just to be safe. Yes, it takes longer than a standard build, and the more features you have, the bigger the difference between a standard rebuild and a CTRL-Q. Still, it is a little like changing your oil: you can put it off, but eventually you'll regret it.
I have a lot more to say on this subject, including an explanation of why you should do a Forced Rebuild on parts, assemblies, and drawings. (And don't think doing a Forced Rebuild in an assembly also rebuilds your parts, because it doesn't!) I'll also be talking a system option that goes hand-in-hand with Forced Rebuild. For now, just make you go to Tools, Options, System Options, Performance, and switch on Verification on Rebuild before you do your CTRL-Q. (You can turn it off afterwards if you want.) Why? Again, a topic for a future blog. Until then, happy building!
Great post! Thanks for explaining in detail the differences in Rebuild and Forced Rebuild. I have gotten in the habit of just always doing the Forced Rebuild...I rarely, if ever, use the regular Rebuild command.
Posted by: Brian McElyea | March 26, 2009 at 12:54 PM