Variants

Parent page: Exploring SOLIDWORKS PCB

The ability to create variations of the same base design is a real strength of SOLIDWORKS PCB, and a tremendous productivity booster for designers. Using variants, you can define any number of variations of the base design, configuring each component to be:

  • Fitted
  • Not fitted
  • Fitted with modified component parameters, such as the component's value.
  • Alternate Part - completely replacing one component, with another.

Variants that use any of these types of variations are all referred to as Assembly Variants, as they only impact on the assembly process - all variants share the same fabricated bare board. There is also support for variations to component overlay information on the PCB, for example changing a components' comment. This type of variation requires two overlay screens to be produced, resulting in two different bare boards. This type of variant is referred to as a Fabrication Variant.

This article take a closer look at how you define and manage variants in SOLIDWORKS PCB.

Understanding Logical and Physical Components

In SOLIDWORKS PCB there are two types of components, logical components, and physical components. This distinction is important, as it underlies some of the most powerful features in SOLIDWORKS PCB. The components you place on the schematic sheet are logical components, each a conceptual entity that represents the actual component that is ultimately mounted on the assembled PCB.

While this one-to-one, logical-to-physical model works well for a simple design, it cannot support all of the design requirements needed by the electronic product designer today. SOLIDWORKS PCB supports powerful concepts like: multi-channel design, where a section of circuitry is stamped out as many times as you require; and variants, where a single design can be implemented with different components fitted to each variant of the board. Features like this require the ability for one logical component to represent multiple physical components.

SOLIDWORKS PCB delivers this one-to-many capability through its compiler technology. When you compile your logical design, each physical component is instantiated in memory, ready for transfer to the board design workspace.

Because there are situations where you, the designer, still need access to the physical components at the schematic capture stage, the physical design is also made available in the schematic editor. The physical components are accessed via the extra tab(s) at the bottom of each schematic sheet. The left-most tab is the logical design you captured, the other tab(s), called the compiled tab(s), represent that chunk of physical design as it will be transferred to the PCB design workspace. Note that the schematic that is presented on the compiled tab cannot be graphically edited, for example you cannot modify the wiring, or move a component.

To examine design variations, you must compile the design and then switch to the compiled tab of the schematic. The Project |  Project Actions | Current Variant field can then be used to show the configuration of the physical components on that sheet, for a chosen variant.

Note that when you switch to a compiled tab the available menu entries on the Ribbons will change, reflecting the commands that can be run when you are viewing the physical design. Click on the logical design tab (Editor) at the bottom of the schematic sheet to return to the standard, editing menus.

Types of Variations that can be Performed

Before you can create a variant, you first create the original design, which is referred to as the base design. Working from the base design, you then go through a process of configuring the components to be: Fitted; Fitted with varied parameters; Not Fitted; or to use an Alternate Part.

  • Fitted - this is the default state of a component, if it is Fitted, then it is not varied. When you create a new variant, all components default to Fitted. A component with a state of Fitted is represented in the Variant Management dialog as an empty cell - more on this dialog later.
  • Fitted with Varied Parameter(s) - a component can have any of its parameters varied, as part of the variant definition process. Modifying the value of a parameter is a local variation, only affecting the output documentation. The original schematic, and the component whose parameter is being varied, are not modified in any way. In the image below, C13 has the Value parameter varied, this variation is shown by displaying the Value using a green, italic font.
  • Not Fitted - if a component is set to Not Fitted, it still exists on the schematic and is transferred to the PCB, but it is removed from the appropriate output documentation, such as the BoM. You can configure how Not Fitted components are presented in the documentation, for example they can be marked with a cross on the schematic and in PCB drawing outputs.  

C10 and C12 are fitted, C11 is not fitted, and C13 is fitted, with a parameter
value varied.

  • Alternate Part - it is also possible to select an entirely different component, as an Alternate Part. Since the Alternate Part is a different component, only one or the other component is presented on the compiled tab of the compiled schematic sheet. There is also the requirement that the alternate part shares the same set of pins, placed in the same locations, as the base part. This is an essential requirement to ensure the connectivity remains valid when the design is compiled.

Example use of an Alternate Part. Q1 is an NPN transistor in the variant on the left, and a JFET in the variant on the right.

There are two ways an Alternate Part is handled on the PCB:

  • If the footprint is the same — if the chosen Alternate Part has the same footprint name as the base part, then only one instance of that footprint will be transferred to the PCB. As multiple footprints can be assigned to a component, you should ensure that the correct footprint is selected in the Variant Management dialog for each variant.
  • If the footprint changes — if the chosen Alternate Part has a different footprint name from the base part, then both footprints are transferred to the PCB. As the designer you must then decide how to position the two footprints on the PCB. Note that both footprints will have the same designator, as only one or the other component is ever fitted.

The ability to select an alternate part is not restricted to choosing the same type of component, so you can, for example, have a base component that is a resistor, then define an alternate part that is a capacitor. It is important to be aware of the consequences of this type of alternate part:

  • The designator - there is only 1 designator for each logical, base component, and it is this designator that is used for all variants. If you swap a resistor for a capacitor you might want to consider using a special designator prefix, for example R_C, or R-C.
  • The pins - the alternate component must have the same number of pins as the base component, and these pins must be in the same location and of the same electrical type. A warning will appear if these conditions are not met.
Alternate part variations within the channel of a multi-channel design are not supported.

Output Documents Affected by Variants

Assembly variants affect all output documentation that includes detail about the purchase or loading of components. This includes:

  • Bill Of Materials
  • Schematic Prints
  • PCB Prints
  • PCB 3D Prints
  • Assembly Drawings
  • Pick and Place files

Fabrication variants also affect the following outputs:

  • Gerber overlay layers
  • ODB++ overlay layers

Creating and Configuring a Variant

Variants are created and configured in the Variant Management dialog (Project | Project Actions | , from the main menus of any document in the project). The dialog has two main regions:

  • The upper region, titled Project Components, lists all of the components in the base design;
  • The lower region, titled Parameter Variations, details all of the parameters of the component(s) currently selected in the upper region.

Variants are created and configured in the Variant Management dialog.

Double-click on a component in the Variant Management dialog to jump to that component on the schematic.

For detailed information about the dialog and its options, see the Variant Management dialog page.

Creating a New Variant

Click the Add Variant button in the Variant Management dialog to create a new variant of the base design. The Edit Project Variant dialog will open. Use this dialog to give the variant a meaningful name, and specify any required variant-level parametric data.

The Add Variant button includes a dropdown, use this to access the Clone Selected Variant command. Cloning is an excellent timesaving feature when you need to define a number of variants that are very similar.

An additional column will appear on the right of the Variant Management dialog, with the just-added Variant description as the column title. All the cells will be empty, an empty cell indicates that this component is Fitted, and is unchanged from the base design. You are now ready to configure the components for the new variant.

Example of a newly added variant.

Defining Component Variations

Once the variant has been created, you are ready to configure the state of each component. This can be done by clicking the component cell in the variant column to reveal the  button, or by right-clicking to access the context menu commands. When the  button is clicked, the Edit Component Variation dialog will open, presenting you with three choices:

  • Fitted - the original component as used in the base design is also fitted/used in this variant of that design. For a newly added variant, all components are fitted by default. The cell for a fitted component is empty. Note that individual parameters can also be varied for a fitted component - simply type in the new parameter value - varied parameters are shown in bold.
  • Not Fitted - the original component as used in the base design is not fitted/used in this variant of that design. For a Not Fitted component, the cell displays the text Not Fitted.
  • Alternate Part - this option gives access to selecting the alternate part. Once chosen, the cell displays the alternate part's Library Link. The lower region of the dialog will display all of the parameters in the alternate part.

Standard Windows multi-select techniques are supported, use these to select and configure multiple components simultaneously.

Example defined variants. Region 1 in the image details the components in the base design, region 2 details the components in the variant called 8K ISP Flash, region 3 details the components in the variant called 16K ISP Flash. Note the bold parameters, indicating that these parameters have different values from the base design.

To make a variant active, either click on that variant's name in the column header, or click in any of that variant's cells.

Choosing an Alternate Part

When you select Alternate Part in the Edit Component Variation dialog, the dialog expands to include controls used to browse and locate the required alternate component. All of SOLIDWORKS PCB's component storage models are supported, such as independent libraries and integrated libraries.

After selecting an alternate part, the software checks for pin-compatibility between the chosen alternate component, and the original base design component. To be pin-compatible, the alternate must have the same number of pins as the original component, and those pins must be identical in their location, and electrical type. No equality in the graphical primitives used in the symbols for the two components is required. If the software detects that the alternate component is not pin-compatible, a Confirm dialog will appear, requiring your OK to proceed with the replacement. While you can proceed with the use of a pin-incompatible alternate component, bear in mind the potential impact on the wiring, and that you may also encounter an error violation when performing a subsequent compilation of the design.

You can visually check the chosen alternate component back in the workspace. Switch to the compiled tab view for the applicable schematic sheet that the component is on, then select the required variant in the Project | Project Actions | Current Variant dropdown. The Schematic Editor will use the symbol graphics for the chosen alternate component. If the component is pin-compatible and graphically similar, you should see very little change. In the image below, the tell-tale sign for the use of a different component is the different comment for the alternate part. Note the green italic font used for the alternate component, this is configured in the Variant Options dialog - click the Drawing Style button in the Variant Management dialog to open this dialog and configure how a varied component is displayed.

Verifying the compatibility of chosen substitute components, graphically. In this example, both variants use a different component to that in the base design, though they are identical in symbol graphics and are pin compatible with the original.

If an alternate component is not already used somewhere in the design, then the symbol graphics for the alternate component are stored in a dedicated file - <ProjectName>.PrjPcbVariants. This file is stored in the same location as the project file itself. Parameter changes for the alternate components are defined in the Variant Management dialog, and saved in the project file. Using the .PrjPcbVariants file keeps the project independent from the source libraries that were used to create the design.
If a base component uses a graphical display mode other than the default Normal (e.g. Alternate 2), and it has an alternate component defined in a variant, then the alternate component will also attempt to use the same number Alternate graphical display mode. If the alternate component does not include this graphical display mode, then the Normal mode is used.

Managing the Display of Data in the Variant Management Dialog

The Variant Management dialog includes various features to help control the amount of data displayed:

  • To remove columns that you are not interested in, right-click in the upper region of the dialog and toggle the visibility of any column in the Columns sub-menu.
  • To display only those components being varied, right-click in the upper region of the dialog and select Only Show Varied Components from the menu.
  • After selecting the Only Show Varied Components mode, right-click again and configure the Filter options as required. In the image below, the Filter has been configured to only display components that are Not Fitted.
  • To change the order the variants are listed, click and hold on the column heading, then drag that column to a new location. Use this in combination with the Fit to Width checkbox to position and size the variant of interest in your preferred working location.

The Variant Management dialog, with columns hidden and a filter applied to only show components that are Not Fitted.

Configuring the Display of Variants on the Schematic and PCB Drawings

Dialog page: Variant Options

As the designer you have control over the way in which varied components are presented on the schematic sheets (which then flows through to printed or PDF'd outputs), and in PCB drawing type outputs, such as assembly drawings. These are configured in the Variant Options dialog, as shown below. To access the dialog, click the Drawing Style button at the bottom of the Variant Management dialog.

Configure how the not fitted components for defined variants are presented on the schematic and in PCB drawing outputs, in the Variant Options dialog.

Resetting and Updating Variant Data

When you configure variations in the Variant Management dialog, the settings are saved in the project file. This includes the Not Fitted state, local parameter variations to a Fitted component, and the parameter values of Alternate Parts. The Alternate Parts are stored in the file <ProjectName>.PrjPcbVariants. The Variant Management dialog includes command for resetting parameters and updating components, to ensure you can keep them in sync with the source component libraries.

Resetting a Varied Parameter

Parameters modified locally in the Variant Management dialog can be restored to their original value by right-clicking on the modified parameter in the Variant Parameter list (shown in bold), and selecting Reset Selected from the menu, as shown below. Note that you can multi-select and reset the value of multiple parameters in a single action, or alternatively, Reset All parameters for that component.

Modified parameters can have their value(s) restored using the Reset Selected or
Reset All commands.

Updating the Parameters in an Alternate Part

If there are parameter changes made to a library component that is used as an Alternate Part, then you to can bring those changes directly into the variant definitions in your project by right-clicking in the Variant Parameter list and selecting Update Values from Library from the menu (as shown below). Note that this updates the parameters only.

If an Alternate Part component has been modified in the library, use the Update Values from Library command to refresh the copy used in your project.

After selecting the Update Values from Library command, you will be required to browse to and locate the component in the source library. Once this has been done, the Update Project Variants From Library dialog will appear, as shown below.

Updating a varied component from the source library, here you configure which parameters are updated, and to which variant the updates are applied.

On the left side of the dialog all parameters are listed, if required you can uncheck any parameter to exclude it from the update process. On the right of the dialog you select which Project Variants to Update, it will default to select the Variant over-which you performed the right-click to access the Update Values from Library command. Click OK to complete the update process.

Note that this parameter update process brings parameter values directly from the library into the Variant Management dialog, it does not update the copy of the component that is stored in the <ProjectName>.PrjPcbVariants file. If you later perform one of the Reset commands to reset parameter values, which retrieves values from the <ProjectName>.PrjPcbVariants file, it may revert a parameter value to an earlier value and overwrite what you have just done.

Updating or Resetting Multiple Parameters for Multiple Components

The Variant Management dialog supports multi-select, this means you can select many or all components across many or all variants in the upper region of the dialog, and then perform parameter update actions on one or more parameters, for one or more components, in one or more variants.

As an example, you might want to reset the manually varied parameters for all components, in all variants.

To do this:

  1. Use the Only Show Varied Components right-click menu option, in combination with the right-click Filter options, to only Show Fitted with Varied Parameters. The upper region of the dialog should now display only those components that have manually varied parameters.
  2. Right-click in the upper region of the dialog again and choose Select All from the context menu. All components currently displayed in the upper part of the dialog will be selected.
  3. Now right-click in the lower region of the dialog and choose Select All from that context menu. All parameters for all components will now be selected. Note that you could have chosen the Select Column command instead, to only apply the Reset action to the components in a specific Variant.
  4. Right-click again in the lower region of the dialog, and choose Reset Selected from the context menu, as shown in the image below.
Alternatively, after step 2, you could simply Shift+click to select a single cell in each variant in the lower region, then right-click and use the Reset All command.

If you have been experimenting with the Filter options and have applied different filters, you may need to reset the filter before attempting another update. To do this, disable the Only Show Varied Components option to clear the filter system, then re-apply it and clear the Filter options as required.

Working with Variant Parameters

SOLIDWORKS PCB supports parameters at various levels of the project. For example, you can add document-level parameters to each schematic sheet in the Document Options dialog. You can also add project-level parameters to the project, on the Parameters tab of the Options for Project dialog. Parameters can also be added to a variant, in the Edit Project Variant dialog.

Parameters have a hierarchy, which means you can create a parameter with the same name at different levels of the project, each having different values. SOLIDWORKS PCB resolves this in the following way:

  1. Variant (highest priority)
  2. Schematic document
  3. Project

That means the parameter value defined in the schematic document overrides the value defined in the Project options, and the value defined in the variant overrides the value defined in the schematic document. Note that schematic-level parameters are not available on the PCB or in the BoM, for these types of output you should use project or variant parameters.

In the images below, a Parameter called ProjectTitle has been defined for the project, and also for each variant. The animation shows the behavior on the PCB as the Current Variant field on the ribbon menus is used to show the base design, then each variant.

The special string .ProjectTitle was placed on the PCB overlay, which is  automatically
linked to parameters of the same name. Note how the value changes as the Variant is changed.

Working With Variants in the Schematic Editor

It is important during design capture that you have complete visibility of the component variations used in each variant. To support this, the schematic editor includes a number of features, as described below.

Examining Varied Components on a Schematic

To examine variant detail on a schematic you:

  1. Compile the project if it is not already compiled.
  2. Select the compiled tab down the bottom of the schematic sheet.
  3. Select the required variant in the Project | Project Actions | Current Variant dropdown.
  4. Components varied on this sheet will then be displayed, as configured in the Variant Options dialog.

Select the compiled sheet and the Variant (orange highlights), to view the components varied on the schematic sheet.

Compiling a Design with Alternate Parts

When you compile a design that includes a variant with Alternate Parts, SOLIDWORKS PCB must compile the design as if both components were present. This is to ensure that any issues are detected; so that the complete design, including both footprints, can be transferred to the PCB editor; and so that all data is available for variant output documentation.

The easiest way to understand this behavior is to keep in mind that it is an either-or situation — although there are alternate parts, only one will ever be fitted.

Defining a Variation from the Schematic Sheet

It is often easier to work directly from the component(s) placed on the schematic sheet, rather than scrolling up and down through a list of components in a dialog. Simply select the component(s) on the sheet, then right-click and select Part Actions » Variants from the menu, as shown below.

Two capacitors have been selected on the schematic, use the right-click command to configure just those components in the Variant Management dialog.

Note that the right-click Part Actions sub-menu also includes a commands to Toggle Fitted/Not Fitted, and to Choose Alternate Part.  You can also perform a local parameter variation directly on the schematic, by double-clicking on the parameter.

The Variant Management dialog will open, displaying only the selected components. Perform the required variations and click OK to apply them to the design.

The Variant Management dialog has been opened from the schematic sheet, detailing just the two selected capacitor components.

You can use this technique when you are first setting up component variations, or when you need to modify an existing component variation. In addition to only presenting the selected component(s) in the Variant Management dialog, if there is a variant currently selected in the Project | Project Actions | Current Variant drop-down, then only that variant will be presented, irrespective of how many variants might actually be defined for the project.

Variation of single component parameters can be performed through the Parameter Variation dialog (double-click on a component parameter to open the dialog).

Working with Variants in the PCB Editor

In the PCB editor, all of the component footprints, for all variants, are always shown. This is necessary because all footprints, for all assembly variants, must be fabricated as part of the bare board. It is the loading of components during the assembly process that then determines which variant is being built.

Because all footprints are always visible on the PCB, it can be difficult to know which components belong to which variant. The PCB editor provides the Project | Project Actions | Current Variant dropdown, which can be used to switch between variants. However the only visible clue to tell if a particular component is fitted or not fitted in that variant, is if the component includes a 3D Body, then that body will appear/disappear to indicate when the component is fitted or not fitted. This fitted/not fitted behavior can be seen much more easily when the PCB is in 3D Layout Mode.

An animation showing population of components for the base design and two defined variants,
of an example board design project
. The use of 3D bodies makes it far easier to distinguish
fitted/not fitted behavior.

Alternate Parts and the PCB Design Process

There is only one type of variation that affects component placement in the PCB design process; when an Alternate Part is specified, and that Alternate Part uses a different footprint from the base design. In this situation you must place 2 footprints on the board. How you position the 2 footprints is up to you, it could be that:

  • The footprints are placed next to one another;
  • The smaller footprint is placed inside the larger footprint.
  • The footprints are exactly stacked (placed one on top of the other), for example when the footprints are identical but they have different 3D models, so must have different footprint names.

2 instances of LED DS1 use exactly the same footprint pattern, but have different 3D
models in each variant, so can be stacked.

The PCB Editor includes design rule checking support for stacked alternate components - because alternate parts share the same UID, the software is aware that they are alternate parts and can prevent the rules engine flagging stacked or overlapping alternate-part footprints.

Viewing a Varied Component Comment

SOLIDWORKS PCB allows fabrication outputs to be driven by variants. More specifically, this allows you to specify a change to a component's Comment parameter, and that change will be passed through to the fabrication output – the silkscreen layer of the generated Gerber or ODB++ output. The PCB Editor supports the visual display of such a change, the Comment field reflecting the value assigned for the currently chosen variant, directly in the workspace.

To pass a changed Comment value for a variant through to the fabricated bare-board, you need to enable the option that allows that particular variant to drive fabrication outputs (in the Edit Project Variant dialog, enable the Allow variation of fabrication outputs option). However to see the change in Comment between variants visually – presented in the PCB workspace – does not require this option to be enabled.

With the variants defined, simply locate a component of interest in the PCB workspace – whose Comment parameter is varied – and switch the current variant from the Project | Project Actions | Current Variant drop-down field. The displayed value for the comment will change in accordance with what has been defined for that current variant.

The changed comment for a particular variant can be viewed on the PCB irrespective of viewing mode – 2D or 3D.

Viewing a varied comment for a component in 2D and 3D.

If you change the comment for a component while viewing a particular variant (not the base design), you will be alerted to the fact that doing so will change its variant value. By clicking Yes, not only will the displayed comment change in the workspace, but the new value will be committed for that component in the current variant. This can be verified by looking at the Comment entry for that variant, in the Variant Management dialog.

Variant Errors

Variant settings are stored in the project file (*.PrjPcb). When the Variant Management dialog is opened, this data is read and analyzed, then loaded into the Variant Management dialog. If there are issues detected during data loading, such as mismatches between component designators or component UIDs, an Information dialog will open outlining the problem, as shown in the image below.

Component UID mismatches are automatically resolved, simply close the dialog and save the project to retain these corrections. Duplicate designators must be resolved at the schematic level, recompile the project and check the Messages panel for warning/error details to resolve these.

Resolve designator and UID mis-matches before continuing with the design process.

 

You are reporting an issue with the following selected text and/or image within the active document: