CmpLib Generation from Active Database Library

Old Content - see latest equivalent

Parent article: Releasing a Component Definition to a Vault

When migrating from an older component management methodology – that uses database libraries – to the use of vault-based components, part of the sequence of migration involves the creation of Component Libraries. The Component Library, or CmpLib, accommodates the design-side definitions for the components themselves. Each component definition references released domain models (Schematic Symbol and PCB Component Items in the target vault), as well as parameters stored within the Component Library itself. Altium Designer's Database Library editor provides the ability to generate one or more Component Libraries from the active Database Library document.

If you are unfamiliar with vault-based component management in Altium Designer, Altium Vault Technology, or indeed any of the technologies, features and functionality offered through Altium's Design Data Management solution, it is advised to take a look at some of the related articles listed to the right. The Design Data Management article in particular provides a higher-level view of Altium's approach to data management, and explains the key concepts involved.

This feature is only available for standard Database Libraries (DbLibs). Component Libraries cannot be generated from SVN Database Libraries (SVNDbLibs).

Pre-requisite Domain Models

Before you can delve into the process of creating a Component Library from the active Database Library, and releasing the component definitions therein to a vault, you must first ensure that all the models themselves – representing those components across the various required design domains – have been released. For board-level components this will generally be a case of schematic symbol and PCB 2D/3D component models, stored in one or more SchLibs and PcbLibs respectively.

Considering single Schematic and PCB libraries, the overall migration flow for the constituent symbols and models can be summarized as follows:

  • Release the PCB 2D/3D component models in the PcbLib – performed within the PCB Library editor.
    • Link the PCB Library file to the required target vault, and a specific folder within that vault.
    • Release the required model(s) into the next planned revision(s) of the corresponding target Item(s).
  • Release the schematic symbols in the SchLib – performed within the Schematic Library editor.
    • Link the Schematic Library file to the required target vault, and a specific folder within that vault.
    • Release the required symbol(s) into the next planned revision(s) of the corresponding target Item(s).

For detailed information on the release of symbols and models to a vault, see the articles Releasing a Schematic Symbol to a Vault and Releasing a PCB 2D/3D Model to a Vault respectively. If your components also include simulation models, information specific to release of this model type can be found in the article Releasing a Simulation Model to a Vault.

Creating the CmpLib

With the domain models migrated into the target vault, the Component Library can now be created. Since this is done from the active Database Library, ensure that this library is open as the active document in the design workspace.

To create the Component Library, use the Tools » Generate Component Library command. Each component definition is created based on a component record in the active Database Library, with links to relevant Schematic Symbol and PCB Component Items (hence the need to have released these first!), as well as parametric data. The Generate Component Libraries dialog that appears provides all the controls necessary to get the source Component Library (or libraries) created just as required.

The Generate Component Libraries dialog - command central for creating one or more CmpLibs from the active DbLib.

Library Options

In the Library Options region of the dialog, first specify document granularity. By default, a single Component Library will be generated from the active Database Library, but you can also generate one CmpLib for each database component, or one CmpLib for each distinct table in the database.

When storing source libraries under version control, management is far easier with one symbol per SchLib, one model per PcbLib and one component definition per CmpLib. In this case, you would generate a single Component Library (containing a single component definition) for each component record in the active Database Library. If you take advantage of the vault's file-less editing capabilities, it doesn't really matter whether you create a single or multiple Component Libraries, since these will not be used as the source for editing, after initial release to the vault.

Next specify the source folder where the source Schematic and PCB libraries can be found. The released Schematic Symbol and PCB Component Items in the vault will be determined through the links to vault items in these source documents. The relationship – which symbol and model used – is sourced from the Database Library file, ultimately ensuring the correct symbol and model referenced by each component record in that database is referenced by each corresponding component definition in the Component Library.

Finally, specify where the generated Component Library file(s) are to be saved. When generating a single CmpLib from the active DbLib, or a CmpLib per table, you can also opt to have the resulting file(s) opened.

Vault Options

In the Vault Options region of the dialog, specify the default settings for new Items that will be created in the vault to receive the release data from the component definitions – the Component Items. Choose the target vault, as well as required Item Naming, Lifecycle Definition and Revision Naming schemes to be applied/adhered to.

Finally, choose the initial folder in the target vault in which these new Component Items will be created. This is often a different folder to that in which the domain models themselves are stored, but it could be the same – as each Item in a vault has a unique ID, storage is not a concern. Folder hierarchy is simply a way to make browsing Items in a vault a far more streamlined experience. You can move folders (and Items) around at any time after release.

CmpLib Generation

After defining all options as required, click OK. Generation will proceed and a confirmation dialog will appear when the process is complete. If generating a single CmpLib, and you have opted to do so, the file will be opened after generation.

Parameters – additional to the default Comment and Description system parameters – are imported into the Component Library from the database as static parameters. These should be reviewed and cleaned up as necessary, prior to release of the component definitions to the target vault.

Example CmpLib generated from an active DbLib. Each component record in the DbLib translates to a component definition in the CmpLib. Observe that the components are grouped, with the group named after the corresponding table in the database.

With the Component Library generated and open as the active document in the workspace, its constituent component definitions can be released to the target vault. To do so, simply use the use the File » Release To <TargetVaultName> command. You have complete control over which definitions get included in the release too!

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