CmpLib Generation from Active Database Library
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.
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).
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.
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.
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.