Searching for Components in File-based & Database Libraries in Altium NEXUS

Created: July 12, 2022 | Updated: July 13, 2022
本文档页面中提到的Altium NEXUS/NEXUS Client(Nexus部署解决方案的一部分)已停止服务。您的所有PCB设计、数据管理和协作需求现在都可以通过Altium Designer实现(通过订阅Altium Designer软件)。查看FAQs页面了解更多信息。

Parent page: Searching for & Placing Components

Managing Available Database and File-based Libraries

In Altium NEXUS, database and file-based library components can only be placed from available libraries. The term "available libraries" includes:

  • Libraries in the current project – if a library is part of the project, then the components in it are automatically available for placement within that project.
  • Installed libraries – these are libraries that have been installed in Altium NEXUS, their components are available for use in any open project.
  • Libraries on a defined search path – it is also possible to define a search path to a folder that holds multiple libraries. Because all files in the search path are searched every time a new component is chosen in a panel, this approach is only recommended for small libraries that hold simple model definitions, such as simulation models. Search paths are not recommended for complex models, such as footprints that include 3D models.

To manage available database and file-based libraries, you can use the Available File-based Libraries dialog accessed by clicking the Components panel menu button at the top of the Components panel and selecting File-based Libraries Preferences from the menu.

Access to file-based and database libraries is disabled by default in Altium NEXUS. To enable these libraries in the Components panel and access the File-based Libraries Preferences option from the Components panel's operations menu, enable the Legacy.UnManagedLibraries option in the Advanced Settings dialog, which is accessed by clicking the Advanced button in the System – General page of the Preferences dialog. If any changes are made in the Advanced Settings dialog, the software must be restarted in order for the changes to take effect.

The Available File-based Libraries 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 searching process ceases. 

Project Libraries

Libraries that are part of the current project are listed under the Project tab of the Available File-based Libraries dialog when that project is the active project in the software. The advantage of project libraries is that whenever the project is opened, the model/libraries will automatically become available. 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.

The Project tab provides a list of available libraries in the current project.
The Project tab provides a list of available libraries in the current project.

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.

Installed Libraries

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 Available File-based Libraries dialog. These models/libraries are available for any design currently open in your installation of the software. Note that this list of libraries is saved with the environment, not with any of the open projects.

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 and you can therefore easily move the design files between them. Additionally, installed libraries can be temporarily deactivated by clearing the Activated checkbox rather than needing to be removed.

The Installed tab lists the libraries that have been made available in this installation of Altium NEXUS.
The Installed tab lists the libraries that have been made available in this installation of Altium NEXUS.

When connected to an Altium 365 Workspace, you can import an installed library currently selected in the dialog's grid area to the Workspace by clicking Import in the right-most column. The Library Importer in its Simple mode with the selected library loaded will open.

Search Path

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 in the Search Paths tab in the Available File-based Libraries dialog. 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.

The Search Path tab lists the libraries that have been found in the defined search paths.
The Search Path tab lists the libraries that have been found in the defined search paths.

To access the Search Paths tab of the Project Options dialog, the UI.ProjectOptions.SearchPaths option must be enabled in the Advanced Settings dialog. The Advanced Settings dialog is accessed by clicking the Advanced button on the System - General page of the Preferences dialog. If any changes are made in the Advanced Settings dialog, the software must be restarted in order for the changes to take effect.

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.

Searching for Components in Database and File-based Libraries

To help find a component in file-based (both installed and not currently installed) and database libraries, Altium NEXUS includes a library searching feature.

Searching is performed in the File-based Libraries Search dialog, which is accessed by clicking the Components panel menu 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.

File-based Libraries Search dialog
Search across installed libraries (Available libraries), or libraries on the hard drive (Libraries on path).

Access to file-based and database libraries is disabled by default in Altium NEXUS. To enable these libraries in the Components panel and access the File-based Library Search option from the Component panel's operations menu, enable the Legacy.UnManagedLibraries option in the Advanced Settings dialog, which is accessed by clicking the Advanced button in the System – General page of the Preferences dialog. If any changes are made in the Advanced Settings dialog, the software must be restarted in order for the changes to take effect.

The search process can be summarized as follows:

  • Searching is performed by defining Filters that are applied to all libraries that can be searched according to the current search Scope settings.
  • The Scope includes the type of libraries to search. Only one type can be searched at a time.
  • The Scope defines which libraries will be searched: either the libraries the software currently has access to (Available libraries) or all libraries within a folder (Libraries on path).
  • When searching libraries on a path, the target is a specific folder and can also Include Subdirectories.
  • You also can search within the search results by setting the Scope to Refine last search.

Setting the Search Filter

The Filters region is used to define text strings that are to be applied to searching. There are three regions to configure:

  • Field – this is the attribute of the component that is to be searched. It can be any component or footprint attribute including the Name, Description, Comment, Footprint, or any parameter that has been added to a component.
  • Operator – defines how a match is determined. This can be when the value equals, contains, starts with, or ends with. Note that equals require an exact string match so it should only be used when you are confident that the search string is correct and complete.
  • Value – the characters to be searched for in the chosen Field matched according to the chosen Operator.

Setting the Scope

There are essentially two approaches to searching:

  • Libraries currently available – this is the list of libraries shown in the drop-down at the top of the Components panel.
  • Libraries stored in a specific folder along with subdirectories if the option is enabled.

Searching will return all items of the chosen search type (Components/Footprints/PCB3D Models) found in all libraries that fall under the defined Scope (Available Libraries/Libraries on path on the specified search path). 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:

  1. In the Scope region, set Search in to Components and select Libraries on path.
  2. In the Path region, set the Path to point to the folder containing the library document that you want to search.
  3. Click Search. The results are displayed in the Components panel as the search takes place.
You can only place components from libraries that are installed in Altium NEXUS. If you attempt to place from a library that is not currently installed you will be asked to confirm the installation of that library when you attempt to place the component.

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.

Component & Library Query Functions

Component and library query functions shown in the Query Helper dialog
Component and library query functions shown in the Query Helper dialog

Underlying Altium NEXUS's schematic and PCB editors is a powerful query engine. By entering queries into this engine you can logically scope precisely those objects you require.

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.

For a detailed overview of using the query language, see Working with the Query Language.

The sections below detail the query language keywords available when searching for database and file-based components in Altium NEXUS. For help on a specific query keyword, use the following collapsible sections or highlight (or click inside) any given keyword - in the Query Helper.

To access the component and library query functions, click the Helper button found in the File-based Libraries Search dialog.

Components

Summary

Returns all components whose Comment complies with the Query.

Syntax

Comment : String

Example Usage

Comment = 'Res1'
Returns all components whose Comment is Res1.

Comment = '100nF'
Returns all components whose Comment is 100nF.

Comment Like '*33*'
Returns all components whose Comment contains 33.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components whose Component Type property complies with the Query.

Syntax

ComponentType = ComponentType_String

ComponentType_String must be one of the strings from the following list:

  • 'Graphical'
  • 'Jumper'
  • 'Mechanical'
  • 'Net Tie'
  • 'Net Tie (In BOM)'
  • 'Standard'
  • 'Standard (No BOM)'

Example Usage

ComponentType = 'Graphical'
Returns all components whose Component Type is Graphical.

ComponentType = 'Standard'
Returns all components whose Component Type is Standard.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.
  • The single quote characters (') at the start and end of ComponentType_String are mandatory.

Summary

Returns all components whose Designator property complies with the Query.

Syntax

Designator : String

Example Usage

Designator = 'U2'
Returns all components whose Designator property is U2.

Designator Like '*Channel*'
Returns all components whose Designator property includes Channel.

Designator <> 'C*'
Returns all components except those whose Designator property starts with C.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns each component that is linked to (or references) a domain model whose properties comply with the Query.

Each component can be linked to models of Footprint, Simulation, PCB3D, Ibis, and Signal Integrity types. It is possible to link a component to more than one model of the same type, but only one model of each type can be selected as a component's Current Model.

Syntax

HasModel(ModelType : String,ModelName : String,CurrentModelOnly : Boolean) : Boolean/Boolean_String

The ModelType string specifies the Type property of a linked model, and must be one of the strings from the following list:

  • 'PCB3DLIB' - use this string to target a linked model whose Type property is PCB3D.
  • 'PCBLIB' - use this string to target a linked model whose Type property is Footprint.
  • 'IBIS' - use this string to target a linked model whose Type property is Ibis Model.
  • 'SI' - use this string to target a linked model whose Type property is Signal Integrity.
  • 'SIM' - use this string to target a linked model whose Type property is Simulation.

The ModelName string specifies the Name property of a linked Model.

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.

Example Usage

HasModel('PCBLIB','SOIC14',False)
HasModel('PCBLIB','SOIC14',False) = True
HasModel('PCBLIB','SOIC14',False) = 'True'

Returns all components that are linked to a Footprint Model whose Name property is SOIC14; that Model does not have to be each component's Current Footprint Model (but it can be).

HasModel('PCBLIB','DIP14',True)
HasModel('PCBLIB','DIP14',True) = True

HasModel('PCBLIB','DIP14',True) = 'True'
Returns all components that are linked to a Footprint Model whose Name property is DIP14; that Model must be the Current Footprint Model for the component.

HasModel('SI','RES1',False)
HasModel('SI','RES1',False) = True
HasModel('SI','RES1',False) = 'True'

Returns all components that are linked to a Signal Integrity Model whose Name property is RES1; that Model does not have to be each component's Current Signal Integrity Model (but it can be).

HasModel('SIM','RESISTOR',True)
HasModel('SIM','RESISTOR',True) = True
HasModel('SIM','RESISTOR',True) = 'True'

Returns all components that are linked to a Simulation Model whose Name property is RESISTOR; that Model must be the Current Simulation Model for the component.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

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.

Each component can be linked to models of Footprint, Simulation, PCB3D, Ibis, and Signal Integrity types. It is possible to link a component to more than one model of the same type, but only one model of each type can be selected as a component's Current Model.

Syntax

HasModelParameter(Parameter Name : String,Value : String,CurrentModelOnly : Boolean) : Boolean/Boolean_String

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.

Example Usage

HasModelParameter('Inductance A','1mH',False)
HasModelParameter('Inductance A','1mH',False) = True
HasModelParameter('Inductance A','1mH',False) = 'True'

Returns all components that are linked to a model that contains a parameter object whose Parameter Name property is Inductance A, and whose Value property is 1mH. That model does not have to be a Current Model of each component (but it can be).

HasModelParameter('Coupling Factor','0.999',True)
HasModelParameter('Coupling Factor','0.999',True) = True
HasModelParameter('Coupling Factor','0.999',True) = 'True'

Returns all components that are linked to a model that contains a parameter object whose Parameter Name property is Coupling Factor, and whose Value property is 0.999. That model must be a Current Model of the component.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components whose Library Reference property complies with the Query.

Syntax

LibReference : String

Example Usage

LibReference = 'LM833'
Returns all components whose Library Reference property is LM833.

LibReference Like 'C*'
Returns all components whose Library Reference property starts with C.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components whose Part Count property complies with the Query.

Syntax

PartCount : Number

Example Usage

PartCount = 2
Returns all components whose Part Count is 2.

PartCount > 4
Returns all components whose Part Count is greater than 4 (i.e. all multi-part components containing more than 4 sub-parts).

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components whose Pin Count property complies with the Query.

Syntax

PinCount : Number

Example Usage

PinCount = 2
Returns all components whose Pin Count is 2.

PinCount > 14
Returns all components whose Pin Count is greater than 14.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

All

Summary

Returns all components, or footprints, whose Description property complies with the Query.

Syntax

Description : String

Example Usage

Description = 'TTL-RS232 DRIVER'
Returns all components, or footprints, whose Description property is TTL-RS232 DRIVER.

Description Like '*RS485*'
Returns all components, or footprints, whose Description property includes RS485.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components containing a parameter object whose Parameter Name and Value properties comply with the Query.

Syntax

HasParameter(Parameter Name : String,Value : String) : Boolean/Boolean_String

Example Usage

HasParameter('Comment','1K')
HasParameter('Comment','1K') = True
HasParameter('Comment','1K') = 'True'

Returns all components that contain a parameter object whose Parameter Name property is Comment, and whose Value property is 1K.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components, or footprints, whose parent library name complies with the Query.

Syntax

LibraryName : String

Example Usage

LibraryName = 'Miscellaneous Devices.SchLib'
Returns all components whose parent library is Miscellaneous Devices.SchLib.

LibraryName Like 'Miscellaneous*.IntLib'
Returns all components, or footprints, whose parent library name starts with Miscellaneous and ends with .IntLib.

LibraryName Like '*Vishay*'
Returns all components whose parent library name contains Vishay.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib, IntLib and DbLib libraries - available, or along a defined search path - will be interrogated. When searching footprints, all PcbLib and IntLib libraries will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components, or footprints, that are resident in the library specified as part of the Query.

Syntax

LibraryPath : String

Example Usage

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.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib, IntLib and DbLib libraries - available along the defined library path - will be interrogated. When searching footprints, all PcbLib and IntLib libraries will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components, or footprints, whose name complies with the Query.

Syntax

Name : String

Example Usage

Name = 'Res1'
Returns all components, or footprints, whose name is Res1.

Name Like 'DIP*'
Returns all components, or footprints, whose name starts with DIP.

Name Like '*33*'
Returns all components, or footprints, whose name contains 33.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • When searching components, all SchLib and IntLib libraries - available, or along a defined search path - will be interrogated. When searching footprints, all PcbLib and IntLib libraries will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.
  • For a schematic component, the name is checked against its Design Item ID property. For a PCB Footprint, the name is checked against its Footprint property.

Summary

Returns all components, or footprints, whose parent source library name complies with the Query.

Syntax

SourceLibraryName : String

Example Usage

SourceLibraryName = 'Miscellaneous Devices.SchLib'
Returns all components whose parent source library is Miscellaneous Devices.SchLib.

SourceLibraryName = 'Miscellaneous Devices.PcbLib '
Returns all footprints whose parent source library is Miscellaneous Devices.PcbLib.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • When searching components, only source schematic libraries - available, or along a defined search path - will be interrogated. When searching footprints, only PCB libraries will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all components, or footprints, that are resident in the source library specified as part of the Query.

Syntax

SourceLibraryPath : String

Example Usage

SourceLibraryPath = ' C:\Documents\Altium\Library\MyExampleLibrary.SchLib'
Returns all components whose parent source library is MyExampleLibrary.SchLib, and where that library is resident in the  C:\Documents\Altium\Library folder.

SourceLibraryPath = ' C:\Documents\Altium\Library\Miscellaneous Devices.PcbLib'
Returns all footprints whose parent source library is Miscellaneous Devices.PcbLib, and where that library is resident in the  C:\Documents\Altium\Library folder.

SourceLibraryPath Like ' C:\Documents\Altium\Library\*'
Returns all components, or footprints, whose parent source library is resident in the  C:\Documents\Altium\Library folder.

Notes

  • The entities returned - Components or Footprints - depends on the chosen scope, defined using the Search in field in the File Libraries Search dialog.
  • When searching components, only schematic libraries - available along the defined library path - will be interrogated. When searching footprints, only PCB libraries will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Footprints

Summary

Returns all footprints whose Height property complies with the Query.

Syntax

Height : Number

Number will follow the measurement units currently employed for the library – either Imperial (mil; 1mil = 0.001inch) or Metric (mm; 1mm = 0.001meter).

Example Usage

Height = 300
Returns all footprints that have a Height property which is equal to 300 current measurement units.

Height >= 5.08
Returns all footprints that have a Height property which is greater than or equal to 5.08 current measurement units.

Height <> 550
Returns all footprints that have a Height property which is not equal to 550 current measurement units.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching footprints, all PcbLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.

Summary

Returns all footprints whose Pad Count property complies with the Query.

Syntax

PadCount : Number

Example Usage

PadCount = 2
Returns all footprints whose Pad Count is 2.

PadCount > 14
Returns all footprints whose Pad Count is greater than 14.

Notes

  • Ensure that the scope of the search is set to Components, using the Search in field in the File Libraries Search dialog.
  • When searching footprints, all PcbLib and IntLib libraries - available, or along a defined search path - will be interrogated.
  • All results are listed in the Query Results listing, back in the Components panel.
Found an issue with this document? Highlight the area, then use Ctrl+Enter to report it.

联系我们

联系原厂或当地办公室

We're sorry to hear the article wasn't helpful to you.
Could you take a moment to tell us why?
200 characters remaining
You are reporting an issue with the following selected text
and/or image within the active document: