SOLIDWORKS provides multiple ways with which to control design intent and model variations. That does not mean it is necessarily a good idea to utilize all of those methods in the same design.
There are some functions within SOLIDWORKS that can be dangerous to combine. Specifically, this article will focus on what can happen when combining configurations with in-context design. Let's review each of these functions in order to better understand how combining them can be harmful.
In-Context Design
Sometimes referred to as "top-down design", creating in-context features is the process of establishing references to geometry in other components. Typically, this is accomplished within an assembly. The features are created within the context of the assembly. The process creates a direct relationship between two components. If the parent component changes, the dependent component will update as well.
Due to their very nature, in-context components are usually created for one-off, unique components. They should not be used in situations where multiple variations of that component will be needed in multiple assemblies, or even within the same assembly. Let's look at an example.
Let's imagine a horse barn is being designed. The overall size of the barn and the pitch of the roof are unknown factors. Because of this, it is easier at the initial stages of the design to base the roof on the overall footprint of the barn and the shape of the front elevation view.
The front wall is designed with a 4/12 pitch. All this means is that for every 12 inches in the horizontal direction, the roof will rise 4 inches.
The roof profile was sketched on the front of the "barn walls" component. This established the first in-context reference. Edges of the front wall were converted to sketch lines, thereby creating more references. Dimensions to geometry external to the roof component created additional references.
The extrusion of the roof itself creates additional external references to the front and back walls of the barn. This occurs because the first direction end condition of the extrusion was offset one foot from the front wall and the second end condition direction was offset one foot from the back wall.
Making Changes
With the in-context design of the roof we have described so far, it becomes easier to see how the roof updates if changes are made to the underlying size of the floor plan. Additionally, if the peak is altered in the barn walls component, the roof will update.
After completing the main design of the horse barn, it has become apparent to the designer the pitch of the roof should be greater. The barn walls component will be adjusted so the peak is 5 feet high, giving the barn roof a pitch of 6/12, rather than 4/12. Not only does this help the snow to slide off in the Winter months, the designer feels it is also visually more appealing.
Configurations
When multiple versions of a part are needed, configurations are often a good choice. Continuing with our horse barn example, the designer's client would like to see each version of the horse barn side by side. This will help them make up their mind.
The designer decides to use configurations, making it easy to switch between versions. Two configurations of the barn walls component are created, one for each roof pitch. The pitch dimension is changed accordingly. (The roof pitch dimension is controlled by an equation, but that is not relevant to our conversation.)
Top Level Configuration
Two configurations were also created in the top level assembly. For each top level assembly configuration, the appropriate part configuration was specified for the barn walls component. The top level configuration can be switched, calling forth the appropriate barn walls component configuration.
So far, everything works perfectly. The roof was built in the context of the assembly and updates accordingly for each configuration. What could possibly go wrong?
The Drawing
Now we get to the crux of the problem. The designer creates a drawing and wants to place each configuration on it's own sheet. They notice, however, that one of the sheets is showing the wrong roof. As can be seen in the following image, the peaks of the front and back walls are at a 6/12 pitch, but the roof is still showing the lower 4/12 pitch. What's going on?
Because the roof was created in-context, it updates depending on whatever configuration is currently active in the assembly file. The roof can only exist in a single state. Because of this, only the drawing sheet showing the currently active configuration in the assembly will ever be correct. All others will be wrong.
Correcting The Problem
We used a horse barn for the example, but obviously this issue will be present with any design, whether it's mechanical or otherwise. Mixing configurations with in-context design is usually not a good choice. What are our options?
Stay Consistent With Configurations
An alternative to in-context design would be to keep using configurations. The roof could have been built without external references, and modified to match the necessary pitch. Use configurations for the roof, rather than external references.
Create Separate Assemblies
Having multiple assemblies is an option, and it may not require as many duplicate files as you think. Only the top level assembly and files with external references will need to be unique to each assembly. This allows for taking advantage of using in-context design and still having multiple versions. We just aren't using configurations.
To create a separate assembly, click Save As and select the option to "Include all referenced components". Give the assembly file a unique name. In our example, and shown in the image below, the name "Horse barn 1" is used. Click the Advanced button to move to the next step.
After clicking Advanced, a list of all the files will be shown. It's very easy to see which files have external references, because they will have the name of the referenced file directly below them. In our case, the referenced file is the assembly, Horse barn 1. To rename a file, double click it. The flashing cursor will appear and files can be renamed as needed. In the image below, the file Barn roof was changed to Barn roof 1, and Shelter was changed to Shelter 1.
All other files are fine just the way they are. You can even overwrite the originals in the same folder, if you like. Click the Save All button (not shown) to complete the process.
Happy Modeling!