To manage available database and file-based libraries, you can use the Libraries Preferences dialog, accessed by clicking the button at the top of the Components panel and selecting Libraries Preferences from the menu.
The Libraries Preferences dialog has three tabs. All of the libraries and model locations defined in these tabs are collated to make up your list of available libraries. When an action is performed that requires searching for a model, such as transferring the design from schematic to PCB layout, the libraries are searched in the order of the tabs, then within each tab in the order that the libraries/models are listed. As soon as the correct model is located, the search process ceases.
Libraries that are part of the active project are listed under the Project tab of the Libraries Preferences dialog when that project is the active project in the software. The advantage of project libraries is that the model/libraries will automatically become available whenever the project is opened. The disadvantage is if the models/libraries are not stored in the same project folder structure as the design files, they can easily be forgotten if the project files are moved.
Any library can be a project library; they do not need to be stored in the project's folder. Right-click on the project name in the Projects panel then select the Add Existing to Project command to include libraries as part of the project.
Libraries and models that have been made available in your installation of the software are referred to as installed libraries. These are listed in the Installed tab of the Libraries Preferences dialog.
Installed Libraries can be listed using an absolute path or a path relative to the Library Path Relative To setting. The advantage of using a relative path is that this lets you create a common sub-environment across multiple PCs, allowing you to easily move the design files between them. Additionally, installed libraries can be temporarily deactivated by clearing the Activated checkbox, rather than removing them.
The Search Path tab presents a list of libraries that have been located according to the path settings defined on the Search Paths tab of the Project Options dialog, which is accessed by clicking the Paths button. Each search path defines a folder and can include sub-folders if the Recursive option is enabled (available on the Search Paths tab of the Project Options dialog after a path is added). All model and library files found on the search path will be available. Search paths are saved with the project.
Retrieving models using search paths can be slow if there are a large number of files in the search path folder(s). For this reason, it is not recommended to use this approach for PCB libraries as they can be large files containing many footprints. The feature was developed to provide a way of referencing available simulation and signal integrity models.
While the software offers flexibility and control over specific model/library locations, it does require the correct file extension to be used for each model type. For example, a footprint will only be found if it is in a file with a .Lib or .PcbLib extension. Similarly, a SPICE .SUBCKT will only be found if it is in a .ckt file and a SPICE .MODEL will only be found if it is in a .mdl file. Whenever a model search does not yield a match, an error appears in the Messages panel.
Once the DbLib/SVNDbLib has been added to the list of available file-based libraries, the components in the database will become available for browsing in the Components panel. Although only a single DbLib/SVNDbLib file is added, each table in the linked database will present as if it were a distinct library.
Each component entry in the panel corresponds to a record in that particular table of the database. In fact, when browsing loaded database libraries, the Components panel behaves like a direct database browser. Symbol and model information is populated from the underlying symbol and model libraries pointed to by the relevant fields of the database (and in conjunction with search paths/locations defined).
By default, only the Part Number and Library Ref fields are displayed in the component listing region of the panel. To 'expose' other fields in the database table, right-click in the region and choose Select Columns from the context menu. This will give you access to the Select Columns dialog, from where you can enable the display of any of the additional fields in that table.
When an SVNDbLib file is added to the list of available libraries, the symbol and model libraries in the repository are cached in a temporary folder, local to the Designer's computer. When an action in the software calls for the use of a schematic symbol, or model, that symbol/model is retrieved from the local cache.
This option essentially provides an 'update timer' for the local cache. If the specified time has elapsed since the last time the cache was updated, then the cache will be updated automatically when one of the listed actions is performed. If an action is performed within this time, the current content of the cache will be used, which may be out of date compared to the content in the repository.
There may be times when you wish to force an update of the local cache, to ensure you have the most up-to-date libraries that are currently stored in the source control repository. For example, when gearing up to transfer the design from the schematic to the PCB.
Searching for a component in database and file-based libraries is possible using the Search field of the Components panel. Enter a string and press Enter to search the current library for that string, anywhere within the visible component parameters.
More detailed searching is performed using the File-based Libraries Search dialog, which is accessed by clicking the button on the Components panel, and selecting File-based Libraries Search from the menu. The upper half of the dialog is used to define what you are searching for, the lower half is used to define where to search.
By default, there are three filter constraints; you can add up to seven additional rows for a total of 10 rows using the Add Row control. The last added filter constraint row can be removed using the Remove Row. You can remove rows that are unused.
File Mask - enter the file mask string or choose one of the existing file masks from the drop-down list. The search is filtered that match the string. You can use the * (any character) wildcard in the string. For example, type * to search all the files and type M to search all files that start with the letter M.
For example, if you want to find a component that you think is in a library within specific folders on the hard disk and that library was not currently listed in the Available File-based Libraries, you would define the search as follows:
Library searching is actually performed using queries. In the File-based Libraries Search dialog, switch to the Advanced mode to examine the query. Hover the cursor over the image above to show the search dialog in Advanced mode.
In the dialog's Advanced mode, you can also create your own queries using the query language keywords to perform a query-based search. Refer to the section below to learn more about available query language keywords.
When searching among Database Components, the Advanced mode will allow you to perform an SQL query search. This level of searching offers a 'fine' search based on a specified query expression, where you can enter an SQL query directly into the query editor section of the dialog.
Hover over the image to see how the dialog changes when you click Advanced, giving you access to a more powerful SQL-based query search. Click Advanced again to come back to the simple-style search.
A query is a string you enter using specific keywords and syntax, which will return the targeted objects. There are many keywords available, allowing you to target objects by their type, their properties, or both.
The sections below detail the query language keywords available when searching for database and file-based components in Altium Designer. For help on a specific query keyword, use the following collapsible sections or highlight (or click inside) any given keyword - in the Query Helper.
The CurrentModelOnly parameter specifies whether or not the linked model has to be a Current Model of each component. When this is False, the linked model does not have to be a Current Model (but it still can be); when this is True, the linked model does have to be a Current Model.
Returns each component that is linked to (or references) a domain model, containing a parameter object whose Parameter Name and Value properties comply with the Query.
The CurrentModelOnly parameter specifies whether or not the linked model (which contains a compliant parameter) has to be a Current Model of each component. When this is False, the linked model does not have to be a Current Model (but it still can be); when this is True, the linked model does have to be a Current Model.
LibraryPath = 'C:\Documents\Altium\Library\MyExampleLibrary.SchLib'
Returns all components whose parent library is MyExampleLibrary.SchLib, and where that library is resident in the C:\Documents\Altium\Library folder.
LibraryPath Like ' C:\Documents\Altium\Library\Miscellaneous*.IntLib'
Returns all components, or footprints, whose parent library name starts with Miscellaneous and ends with .IntLib, and where that library is resident in the C:\Documents\Altium\Library folder.
LibraryPath = 'C:\Test Projects\Example DBLib\VishayCapacitor.DBLib'
Returns all components whose parent library is VishayCapacitor.DBLib, and where that library is resident in the C:\Test Projects\Example DBLib folder.