使用变量管理器

Chinese - Translation is available for Altium Designer 23: Go to the page

The Variant Manager is a document-based user interface that allows you to view, create, and manage design variants of your PCB design project. To access the Variant Manager, right-click the project entry in the Projects panel and select Variants or choose Project » Variants from the main menus of the schematic or PCB editor.

The Variant Manager is in Open Beta and available when the UI.ModernVariantsManager option is enabled in the Advanced Settings dialog. When the UI.ModernVariantsManager option is disabled, the Variant Management dialog is used for creating and configuring design variants. Refer to the Working with the Variant Management Dialog page to learn more.

Working with Variants

Creating a New Variant

To add a new variant, use the Add Variant button located at the top-left of the Variant Manager when the Variants tab is active. An additional variant column with a default title will appear in the grid area as shown in the image below. All the cells of the new column will be empty, where an empty cell indicates that this component is Fitted and unchanged from the base design.

A new variant is added with all components Fitted by default.
A new variant is added with all components Fitted by default.

  • To save the Variant Manager after making changes, choose File » Save Variants from the main menus (shortcut Ctrl+S).
  • When the number of variants exceeds 100, automatic pagination applies to the Variant Manager, with each hundred variant columns shown on a separate page. In this case, the current page number and the total amount of pages are shown at the bottom of the Variant Manager. Use the arrow buttons to navigate between pages.

You can filter the variants that are displayed in the Variant Manager using the Variants Filter dialog, which is accessed by clicking  in the upper right corner. To filter the displayed variants, enable the checkbox associated with the variant(s) you want to be displayed. When OK is clicked in the dialog, the variants are filtered according to the enabled checkboxes. When a filter is applied, the filter button is displayed as . To remove or change filtering, click the filter button to reopen the Variants Filter dialog, then update the checkboxes. When the Project Variants checkbox is enabled, all variants in the project are displayed. 

Configuring Variant Properties

To change variant options, use the Properties panel in its Variant mode, which can be accessed by right-clicking the column header of the required variant and selecting Properties.

Access the Properties panel in Variant mode to change the options of a variant.
Access the Properties panel in Variant mode to change the options of a variant.

  • Define a meaningful name for the variant using the Name field.

    The name of a variant can also be changed using the Rename Variant dialog that is accessed by clicking the variant column header to select it and then clicking  at the top-left of the Variant Manager or by right-clicking the variant column header and then selecting Rename Variant.
  • If Fabrication Variants need to be generated from the design, enable the Allow variation of fabrication outputs option. If an output job has a variant nominated for a fabrication output, and that variant does not have the option enabled, the job's variant name will be displayed in red. Note that the red variant name is simply a warning flag, and the variant-specific output files will still be generated.

    If Paste Mask outputs need to be generated for a design that includes variants with 'Not Fitted' components, enable the Allow variation for paste mask option. These components will no longer have Paste Mask included on their pads.

    For information on how to add and view variants to an Output Job file, visit the Preparing Manufacturing Data with Output Jobs page.
  • Use the Variant's Parameters region of the panel to define the list of variant-level parameters.

    A variant parameter can be shown in a schematic or PCB document by placing a special string. Learn more about Special Strings on a Schematic and Special Strings on a PCB.

    Altium Designer supports parameters at various levels of a project: project, schematic document, and variant. Parameters included at various levels in a project exist in a hierarchy, which means you can, in fact, create a parameter with the same name at different levels in the project, where each has a different value. Altium Designer resolves this situation using priorities in the following way:

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

    This arrangement means that the parameter value defined in a schematic document overrides the value defined in the Project options, and the parameter's value defined in a Variant overrides the value defined in the schematic document.

Properties of a Variant

Right-click on a cell, then choose Properties to open the Properties panel that displays the details of the chosen Component/Group. The Component Parameters of the variant can be edited as needed. 

The parameters can also be viewed and edited by selecting a component in the grid and then expanding the Parameter region that appears at the bottom of the grid.

Cell contents of variants can be copied, pasted, or cut using the respective commands in the right-click context menu or by using the appropriate shortcuts (Ctrl+C, Ctrl+V, Ctrl+X, respectively). 

Defining Component Variations

Each component in the base design can be configured to be:

  • Fitted – the default setting when a new variant is created.
  • Not Fitted – the original component as used in the base design is not fitted/used in this variant of that design.
  • Fitted with modified component parameters, such as the component's value.
  • Alternate Part – completely replacing one component with another.

Changing the state of a component in a design variant can be done by clicking the component cell in the variant column and accessing the cell drop-down that offers three choices:

  • (Fitted) – the original component as used in the base design is also fitted/used in this variant of that design. Note that individual parameters can also be varied for a fitted component – see below.
  • Not Fitted – the original component as used in the base design is not fitted/used in this variant of that design.
  • Alternate Part – this option allows a different (alternate) part to be selected. Use the Replace dialog (which is a modal dialog version of the Components panel) to select the required alternate part. Once that part is chosen, the cell displays the alternate part's ID.

    After selecting an alternate part, the software checks for pin compatibility between the selected 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. The graphical primitives used in the symbols for the two components are not required to match. If the software detects that the alternate component is not pin-compatible, a Confirm dialog must be dismissed before the replacement is accepted. In this case, you need to be mindful of the potential impact on the wiring.

You can choose an alternate part with no changes to a symbol on a schematic or needing to add a footprint to the PCB. In the Properties panel, enable the Do not overwrite schematic symbol and/or Do not overwrite PCB footprint options as needed. Parameters for the chosen alternate are faithfully presented in the ActiveBOM.

The above-listed states of components can also be found by right-clicking in the grid, choosing Set Selected As then selecting the desired state from the associated menu as shown below.

Define component variation using the drop-down in the cell of the required variant column. When selecting the Alternate Part option, use the Replace dialog to select an alternate part.

Individual parameters can be varied for a fitted or alternate component by typing in a new parameter value in the Properties panel. Click the cell of a component in the required variant column, and use the column of the selected variant in the Component Parameters region of the Properties panel in its Component for variant mode to type in a varied parameter value. For the Footprint parameter, click the cell drop-down to select a footprint if multiple footprint models are assigned to the component. A parameter value different from the base design will be shown in yellow, and the component cell in the grid area will show the component name.

Example of defining an alternate parameter of a fitted component. Type in a new parameter value as shown in the image. Hover the cursor over the image to see the component cell after defining a new parameter value.
Example of defining an alternate parameter of a fitted component. Type in a new parameter value as shown in the image. Hover the cursor over the image to see the component cell after defining a new parameter value.

If you want to only view components that have been changed, enable the Changed Only option at the top right of the Variant Manager (or right-click within the main area of the Variant Manager and then select Only Show Varied Components). In the image below, four changes were made to variants then the Changed Only option was enabled, which changed the display to show only the five varied components. This option is very helpful with large designs that have numerous variants within them.

Enable the Changed Only option to effectively filter the component list and display only varied components.
Enable the Changed Only option to effectively filter the component list and display only varied components.

 

Updating an Alternate Part Parameter

If a library component that is used as an Alternate Part has had parameters changed in the library, then you can bring those changes directly into the variant definitions in your project. Select the Update Values from Library command from the right-click menu of the Parameter region at the bottom of the Variant Manager or in the Component Parameters region of the Properties panel when the required alternate component is selected in the main grid area to bring any parameter changes made to a library component.

Access the Update Values from Library command in the Variant Manager. Shown here is access from the right-click menu of the Parameter region when the required component entry is selected. Hover the cursor over the image to see access from the Properties panel when the alternate part entry is selected.
Access the Update Values from Library command in the Variant Manager. Shown here is access from the right-click menu of the Parameter region when the required component entry is selected. Hover the cursor over the image to see access from the Properties panel when the alternate part entry is selected.

Browse to and locate the component in the source library via the Replace dialog and click OK to open the Update Project Variants From Library dialog. All parameters are listed on the left of the Update Project Variants From Library dialog – if required, any parameter can be deselected to exclude it from the update process. On the right of the dialog, the target Project Variant can be changed (Project Variant To Update). This will default to select the variant that was selected when the Update Values from Library command was activated. Click OK to complete the update process.

Note that this updates the parameters only and not the component itself.

Copying a Variant

You can copy a variant using the Make a copy command. Right-click in the header of the variant name column and then choose the Make a copy option. A new column with the same data and name (appended with "Copy") will be added. You can use the Rename option to name the new column a suitable title.

Removing a Variant

To delete the variant, select the header, then use the  icon. The ability to delete this or all variants is also included in the right-click context menu as shown below. A dialog opens for confirmation before the deletion occurs.

Working with Groups

To facilitate the management of a large number of design variants, the Variant Manager also allows you to create groups of components from a chosen schematic sheet, sheets referenced by a chosen sheet symbol, or a chosen component class with a functional-based view of component variations. For each group, you can define one or more ‘options’, which essentially reflect some variation of one or more components in the group. Variants can then be created based on these defined groups and options, with support for creating a hierarchy of variants. When a change is required, editing a value within a group option is instantly reflected in all variants that use that group option.

The workflow of working with groups is the following:

  1. Switch to the Groups tab using the control at the top of the Variant Manager.
  2. Using the drop-down menu of the Add Group button, select a schematic document, sheet symbol, or component class for which a group should be created.

    Add a group to facilitate further variant management based on this group.
    Add a group to facilitate further variant management based on this group.

  3. A new group will be listed in the left-hand pane of the Variant Manager, while the components of the selected group will be listed on the right.

    By default, the name of the selected schematic sheet, sheet symbol, or component class will be assigned to the newly created group. Use the Rename button at the bottom of the group list region to rename the group as needed.

    Use the Add Option button to add an option for the currently selected group. An additional option column with a default title will appear in the grid area. All the cells of the new column will be empty, where an empty cell indicates that this component is Fitted and unchanged from the base design.

    Add an option for the selected group as shown in the image. Hover the cursor over the image to see the default option column.
    Add an option for the selected group as shown in the image. Hover the cursor over the image to see the default option column.

  4. Assign a meaningful name for the newly created option by changing the default name. Click the option's column header to select it and then click the Rename button at the bottom of the grid area or right-click the header and select Rename to access the dialog to enter a new name.

    Set a meaningful name for an option.
    Set a meaningful name for an option.

  5. Using the component cells in the column of the required option, configure the component variations. The process is the same as when defining component variations for a variant.

    Configure component variations for the selected option.
    Configure component variations for the selected option.

    It is not recommended to manually change component parameters. Additionally, alternate components are highly recommended. To use alternate footprints, use a separate component when working with groups.
    Cell contents of variant group options can be copied, pasted, or cut using the respective commands in the right-click context menu or by using the appropriate shortcuts (Ctrl+C, Ctrl+V, Ctrl+X, respectively).
  6. Add further options for the selected group by right-clicking in the grid area and selecting Add Option. Configure the new option as required.

    Add and configure further options as required.
    Add and configure further options as required.

  7. In the Variants tab of the Variant Manager, the components for which a group was created will be shown under the appropriate entry in the grid area. Using the drop-down of the cell for a group entry, select an option created for this group on the Groups tab. Variations configured for the components in this group will be applied.

    Add an option for the selected group as shown on the image. Hover the cursor over the image to see the default option column.
    Add an option for the selected group as shown on the image. Hover the cursor over the image to see the default option column.

Copy a Group Option

To copy an option of a variant group, on the Groups tab, right-click in the <New Option> column heading then choose Make a copy. A new column with the same data and name (appended with "Copy") will be added. You can use the Rename option to name the new column a suitable title.

Notes

  • When you configure variants, 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.
  • Variant columns can be pinned to show them first, at the left of unpinned columns. To pin a variant column, hover the cursor over its header and click .
  • Double-click on a component or right-click, then select the Cross Probe option to jump to that component on the schematic.
  • Use the Select All command from the right-click menu of the grid area on the Variants tab or the Parameter region to quickly select all grid content.
  • Use the Invert Selection command from the right-click menu of the grid area on the Variants tab or the Parameter region to quickly select non-selected and deselect selected entries.
  • Click the View Report button at the bottom left of the Variant Manager to generate a detailed variant report in HTML format using the Variants Report dialog that opens.
  • Right-click in the grid area of the Variants tab or the Parameter region and use the following commands of the context menu to generate report files:
    • Report – click to open the Report Preview dialog to create a printout of the grid.
    • Save All – click to open a dialog to save a listing of all components / all parameters for the selected component to a tab-formatted text file (*.txt).
    • Save Selected – click to open a dialog to save a listing of selected components / selected parameters as a tab-formatted text file (*.txt).
  • When the schematic is changed, an appropriate notification is shown at the top of the Variant Manager. Click the Refresh control next to the notification to update the data in the Variant Manager.
  • The Delete option found when right-clicking on a cell can be used to delete a variant, a group or an option.
If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.

软件的功能取决于您购买的Altium产品级别。您可以比较Altium Designer软件订阅的各个级别中包含的功能,以及通过Altium 365平台提供的应用程序所能实现的功能。

如果您在软件中找不到某个讨论过的功能,请联系Altium销售团队以获取更多信息。