Creating & Defining the Database Library in Altium Designer

Вы просматриваете версию 21. Для самой новой информации, перейдите на страницу Creating & Defining the Database Library in Altium Designer для версии 25

The backbone of the database library feature is the database library file. This comes in two forms, depending on whether you are using a standard database library, or a version-controlled database library:

  • Standard Database Library - the Database Library file. This file is created and managed using Altium Designer's DatabaseLib Editor. This editor becomes available when the active document in the main design window is a *.DbLib file.
  • Version-Controlled Database Library - the SVN Database Library file. This file is created and managed using Altium Designer's SVNDatabaseLib Editor. This editor becomes available when the active document in the main design window is a *.SVNDbLib file.

Example DbLib file, open in the DatabaseLib Editor. Hover over the image to see an example SVNDbLib file, open in the SVNDatabaseLib Editor.Example DbLib file, open in the DatabaseLib Editor. Hover over the image to see an example SVNDbLib file, open in the SVNDatabaseLib Editor.

Create a new file of these types by choosing the File » New » Library command from the main menus and selecting the Database Library or SVN Database Library option from the Database region of the New Library dialog that opens.

Connecting to an External Database

Table and mapping data will only appear in an Editor's main display window after the active Database Library/SVN Database Library file is successfully connected to the required external database. Connection is defined using the controls provided in the Source of Connection region.

Specifying the connection to the external database through a DbLib file. Hover over the image to see connection through an SVNDbLib file.Specifying the connection to the external database through a DbLib file. Hover over the image to see connection through an SVNDbLib file.

Any database which provides OLE DB support can be connected to. The options provided in this region each use an OLE DB connection string to connect to the target database. Some databases may not offer OLE DB support. However, virtually all Database Management Systems in use today can be accessed through the Open Database Connectivity (ODBC) interface. The database link feature uses Microsoft's ODBC provider, which allows an ADO (ActiveX Data Object) to connect to any ODBC data source. The result is that any ODBC database can be connected to. The OLE DB provider for the ODBC database is specified as part of the connection string.

Connection can also be defined on the Connection tab of the Database Connection dialog, accessed by choosing the Tools » Database Connection command, from the main menus, or by clicking the Advanced button (to the right of the Connect button, at the bottom of the region).

Fast Connection to Access and Excel Databases

The Select Database Type option offers an expedited method of creating a connection string when the target database has been created using Microsoft Access, or Microsoft Excel. Using this option, select the database type and then browse to and select the required database file. The corresponding connection string will automatically be composed and entered into the field for the Use Connection String option.

The full path can be specified, or you can opt to store the path relative to the Database Library/SVN Database Library file.

Building a Connection String

If your company database is not Access or Excel-based, and you want to build the connection string explicitly, enable the Use Connection String option and then click the associated Build button to the right. The Data Link Properties dialog will appear.

Building a connection string through the Data Link Properties dialog.Building a connection string through the Data Link Properties dialog.

The dialog opens at the Connection tab. The OLE DB Provider Microsoft Office <Version> Access Database Engine OLE DB Provider is set by default on the Provider tab of the dialog. This is the default provider setting for new Database Library/SVN Database Library files and is also used to connect to Access database files (*.mdb). Change the provider as necessary.

From the Connection tab enter the name (including path) of the database you wish to connect to.

If your database requires login permission, enter this as required, along with any other advanced settings available from the Advanced tab of the dialog. The All tab provides a summary listing of link options defined, as well as extended options relating to the chosen OLE DB Provider. Options can be modified as required from this tab.

Once link options have been defined you can check for successful connection by clicking on the Test Connection button (on the Connection tab). A successful connection will yield a confirmation dialog to that effect.

The Data Link Properties dialog is a Microsoft dialog and, as such, pressing F1 or using the available Help button will gain access to the Microsoft Data Link Help file. This file is not part of Altium Designer's documentation set.

Specifying a Data Link file

If the data source to which you wish to connect is described using a Microsoft Data Link file (*.udl), enable the third of the connection options - Use Data Link File - and click the associated Browse button to locate the required file. A Data Link File is essentially a storage vessel for a connection string.

Proceeding with Connection

After defining the connection to the external database, the text of the Connect button will become bold, signifying that you can proceed with the connection. If the connection details are correct, the table and mapping information for the target database will be loaded into the Database Library/SVN Database Library file. The text on the Connect button will change to Connected and the button will be grayed-out.

If there is a problem with the connection details, for example a connection string is built incorrectly, or a path is entered erroneously, connection will fail and a message will appear alerting you to this fact. Check your connection settings and click the Connect button again.

Examples of flagging connection failure in a database library. Examples of flagging connection failure in a database library.

If you change the connection settings whilst connected to a database, live connection will be lost and the text on the Connect button will change to Reconnect. Click to re-establish the connection.

After successful initial connection, and after saving the Database Library/SVN Database Library file, the connection will be made automatically each time the file is opened, provided the target database's location and filename are not changed.

Specifying the Link to the Version Control Repository (SVNDbLib Only)

With a DbLib, the symbol and model libraries are stored on your hard disk, or other local/network medium. Remember that for an SVNDbLib, these libraries are stored under version control in a Subversion repository. As part of the SVNDbLib file, you must define the link to this repository. The connection to the SVN repository is defined on the SVN Repository tab of the Database Library Options dialog (Tools » Options). This dialog can also be accessed by clicking the Options button in the Field Settings region of the document view.

Example connection to a file-based SVN repository.Example connection to a file-based SVN repository.

Database Table Listing

After successful connection to the external database, table and mapping data will be loaded. The left-hand side of the DbLib/SVNDbLib document lists all tables that exist in the connected database.

For an Excel-based database, a table is actually a sheet in that linked spreadsheet. The name of the table will have the suffix $.
If the target database has been created using multiple Excel spreadsheet files (*.xls), there is a limit of 64 sheets that can connect, due to ODBC driver limitations.

Tables existing in the connected database.Tables existing in the connected database.

The Enable option next to each table entry allows you to control whether or not that table is to be part of the resulting database library. When the database library is added to the list of Available File-based Libraries for browsing in the Components panel, each table will appear as a separate library entity. So although only one database library is added in real terms, from the perspective of the Components panel, it is as though you have added multiple, distinct libraries. For more information, see Searching for Components in File-based & Database Libraries.

As you click on a table entry in the list, its icon changes from Database table icon, inactive table to Database table icon, active table in order to distinguish it as being the currently active table. The table - with all its data - appears on the Table Browser tab of the document. This is an editable view of the table, and allows you to quickly refer to its contents, and edit where required, without having to launch the external database itself.

Browsing a source table in the connected database.Browsing a source table in the connected database.

To enlarge the area of the Table Browser (as shown in the illustration above), collapse the entire area above (connection and field settings) by clicking the Collapse icon - collapse a region of the database library document control, at the top-right of the document view. Click Expand icon - expand a region of the database library document to expand. The table also supports familiar grouping, sorting, and filtering features.

Specifying Matching Criteria

After a component has been placed from the external database, there needs to be some way of retaining the link between that placed component and the database record whose information was used to create it. In essence, the two need to be matched.

When a component is placed, its parameter information is created on-the-fly, using the corresponding fields in the database record. The post-placement link between the schematic component and the database record is established using one or more of these parameters. The Field Settings region of the document allows you to define the matching criteria - either a simple, single key lookup, or a more advanced match using a Where clause.

Matching criteria is specified on a per-table basis.

Controlling post-placement matching criteria.Controlling post-placement matching criteria.

Single Key Lookup

If the Single key lookup option is enabled (default) the Database field and Part parameter fields become available. The former lists all of the available field names (column headers) in the active table of the database. As the parameters for a schematic component are added as it is placed, the Part parameter field will reflect whatever database field is chosen.

Typically, the lookup key field used is something that uniquely identifies each component in the external database, such as a Part Number. The chosen lookup field is distinguished on the Field Mappings tab of the document by the Design Parameter entry shown as grayed-out.

Single key mapping by Part Number.Single key mapping by Part Number.

When using the Update Parameters From Database feature at some stage after placement, information is read from the chosen key parameter in the placed schematic components and then searched for in the chosen (key) field of the database - across all enabled tables. When there is a match, information from other cells in that record of the parent table can then be taken back to the mapped parameters in the schematic component.

Advanced Matching - the Where Clause

While the Single key lookup option works well if there is a unique part number/id to match on, it is not so effective when matching by a parameter that is not unique, such as capacitance or resistance. In this case the more advanced Where clause should be used, enabling you to specify multiple key matching in order to link the schematic component to its source database record.

In its simplest form the Where clause (written using SQL syntax) reflects the chosen entries that define the single key lookup. For example if the Database field was chosen to be Part Number - the default - the Part parameter field would automatically be set to Part Number also, and the entry for the Where clause would be :

[Part Number] = '{Part Number}'

The square brackets around the database field (table column) are quote characters, as specified on the Advanced tab of the Database Connection dialog. Access this dialog either by clicking on the Advanced button in the Source of Connection region of the document, or from the main Tools menu.

Mapping between the component parameters and the database, using a Where clause The Advanced tab of the Database Connection dialog provides additional SQL options for quoting
tables, or using table schema names, in a constructed Where clause.

When quoting tables, the specific quote characters used will depend on the database you are using. For example, square brackets [ ] are only usable in Microsoft databases like Access, Excel via ADO, or MSSQL (later versions). MYSQL would use the ` (backtick) character for quoting. You really only need to quote column names, in any database, if they include spaces or are reserved words (for that database). Check the documentation for your particular database software to see which quote characters are used (if any).

The curly brackets (braces) specify that the entry being referenced is a design parameter. The single quotes are used to specify the design parameter be treated as a string, as opposed to a number (no quotes). The type matching is very important, as SQL is type sensitive. The design parameter should be made the same type as the column in the database.

Using standard SQL syntax, the Where clause can then be extended to match using multiple Database field/Part parameter entries, for example:

[Capacitance] = '{Capacitance}' AND [Tolerance] = {Tolerance} AND [Manufacturer] = '{Manufacturer}'

In this case a single record in the relevant table of the database would be linked to, using three different design parameters. Notice that the entry for the Tolerance design parameter is not quoted. This means that the column type in the associated table of the database is Number and not String.

Using standard SQL syntax you can conceivably make the Where clause as simple or as complicated as you like.

Mapping Database Fields to Design Parameters

Design parameters for a component placed from a database library are created/added at the time of placement. Which parameters are actually created, and the options used to update their information after placement - using the Tools » Update Parameters From Database command - is determined by mapping and update information specified in the Database Library/SVN Database Library file. These settings are performed on the Field Mappings tab of the main document view.

Mapping and update options are specified on a per-table basis.

Specify parameter mapping and update options on the Field Mappings tab of the DbLib/SVNDbLib document.Specify parameter mapping and update options on the Field Mappings tab of the DbLib/SVNDbLib document.

Model and Parameter Mapping

The first two columns (from the left) on the Field Mappings tab are used to control which information from the database is to be mapped to the component's attributes, models and parameters.

  • Database Field Name - this column lists all field (column) names in the currently active table of the database.
  • Design Parameter - this column defines how each corresponding field in the database is to be used. This could be to source a component's symbol or footprint model (it will be enclosed in square brackets), or if it is to be included as a component parameter (these are not enclosed in brackets).
When you open a DbLib/SVNDbLib document that has been connected to a database, you will notice that some Design Parameters include square brackets and others do not. The square brackets denote a reserved name, such as [Library Ref]. This data is used to populate the component's attributes and models. Design Parameters that do not include square brackets become component parameters.

Initial mapping is performed automatically upon connection to the database, with all database fields mapped.

Note that the automatic mapping assumes that the Database Field Names match the reserved name used in Altium Designer. If they do not, then the mapping must be manually configured.

Attributes & Models

If the database field name is one of the following reserved names, the corresponding attribute/model mapping entry will be automatically set in the Design Parameter field:

  • Description[Description]
  • Footprint Ref[Footprint Ref]
  • Footprint Path[Footprint Path]
  • Footprint Ref n[Footprint Ref n]
  • Footprint Path n[Footprint Path n]
Unlimited footprint model references (and paths) can be specified in a database table and mapped in the DbLib/SVNDbLib file. In the reserved names, n represents a positive integer starting from 2.
  • Library Ref[Library Ref]
  • Library Path[Library Path]
  • Orcad Footprint[Orcad Footprint]
  • Orcad Library[Orcad Library]
These references are used when importing an OrCAD CIS configuration file and libraries, and generating a standard database library (DbLib).
  • PCB3D Ref[PCB3D Ref]
  • PCB3D Path[PCB3D Path]

    • References to PCB3D refer to the legacy 3D viewer, these should not be used for new designs. The PCB Editor's native 3D engine can render component bodies and imported 3D model files associated with component footprints.
    • PCB3D model mappings can be defined in an SVNDbLib file, however storage of PCB3D model libraries in the Subversion repository is not supported.
  • Sim Description[Sim Description]
  • Sim Excluded Parts[Sim Excluded Parts]
  • Sim File[Sim File]
  • Sim Kind[Sim Kind]
  • Sim Model Name[Sim Model Name]
  • Sim Netlist[Sim Netlist]
  • Sim Parameters[Sim Parameters]
  • Sim Port Map[Sim Port Map]
  • Sim Spice Prefix[Sim Spice Prefix]
  • Sim SubKind[Sim SubKind]

    Refer to the Simulation Model Mapping below to learn about simulation model-related fields in more detail.
    Only one simulation model link can be defined for a component in an external database. Typically there will only ever be a single simulation model linked to a component. Should you wish to set up multiple simulation model links, the other links will need to be defined and stored with that component in the source schematic library file.
    Linked simulation models are supported for a version-controlled database library (SVNDbLib), however storage of simulation model files in the Subversion repository is not supported.

These mappings define the component attribute and model information for the component. When the component is placed, the schematic symbol specified by the corresponding database record's [Library Ref] field will be extracted from the specified schematic library. Similarly, PCB footprint and Simulation model information stored in the record will be added to the component as linked footprint and simulation models respectively.

The [Library Ref] entry must exist in the Design Parameter column and be mapped to the Database Field Name that specifies the schematic symbol, to be able to place a component from the Database Library/SVN Database Library onto a schematic. If the database table contains the symbol reference under a different Database Field Name, for example SCH Symbol, you will need to manually set the associated Design Parameter entry for this field to [Library Ref], using the available drop-down list for that cell.

Similarly, if model reference information is entered into the database using different field naming, you will need to manually map by choosing the appropriate Design Parameter entry ([Footprint Ref], [Footprint Ref n], [PCB3D Ref], [Sim Model Name], and so on) from the drop-down list, for each field in turn.

Mapping the symbol and footprint models from the database to the design componentIn order to define the symbol and model information for a component upon placement, it is the symbol and model reference fields in the database that are the crucial
mapping entities - ensure that there is a symbol and at least one PCB footprint reference as part of the defined mapping.

As mentioned, multiple PCB models can be mapped. The Database Field Name that is mapped to Design Parameter [Footprint Ref] will be the default footprint when the component is placed on the schematic. It is this footprint that will be placed when the design is transferred to the PCB domain.
When mapping symbols and models for a DbLib/SVNDbLib file, path information in the external database is optional. For more information see Specifying Symbol and Model Library Locations.

Simulation Model Mapping

This section discusses each of the database fields that can be added to an external database table in order to define the simulation model link, which will be created upon component placement.

  • Sim Model Name – the name of the model that you wish to use. After the component is placed, this information will appear in the Model Name field of the Sim Model dialog.

    When mapping database fields to design parameters in the DBLib file, the Sim Model Name field is analogous to the Footprint Ref, Library Ref , etc, fields.
  • Sim Description – a description of the linked model. This information is optional and does not affect the operation of the simulation model link.
  • Sim File – a particular model file in which to find the simulation model specified in the Sim Model Name field. There are a number of ways in which this field can be used:

    • You can enter an absolute path to a model file (e.g., C:\DbLibs\Switching Diodes\Libraries\JAS33.mdl). The model specified in the Sim Model Name field will be searched for within this file and used if found.
    • You can enter a relative path (relative to the DbLib file) to a model file (e.g., Libraries\JAS33.mdl). The model specified in the Sim Model Name field will be searched for within this file and used if found.
    • You can enter the model filename only (e.g., JAS33.mdl). Search paths defined as part of the DbLib file will be used to locate the first model file that matches the specified name, and which contains a match for the model specified in the Sim Model Name field.
    • You can leave the field blank. Search paths defined as part of the DbLib file will be used to locate the first model file containing a match for the model specified in the Sim Model Name field.
    Search paths are defined for the DbLib file from the Symbol & Model Search Paths tab of the Database Library Options dialog (Tools » Options).
  • Sim Kind – the parent category for the model being linked to.
  • Sim SubKind – the type of model being linked to.
  • Sim Netlist – the netlist template information, in accordance with the type of model being linked to. This field becomes especially important if you are specifying your own netlist template and have set the Sim SubKind field to Generic Editor, giving you more control over what information is placed in the netlist.

    This field must be defined and not left blank, otherwise, no entry for the model will be made in the simulation netlist, and the part will not simulate when placed from the database library.
  • Sim Spice Prefix – the SPICE prefix for the model type you are linking to.
  • Sim Port Map – the mapping of pins from the schematic component to the pins of the linked model. After the component is placed, this information will appear in the Pin Mapping region of the Sim Model dialog.

    Each pin pairing must be entered in the following format:

    (SchematicPinNumber:ModelPinNumber),

    with each mapped pairing separated by a comma.

    For example, when mapping a diode simulation model where schematic pin 1 (anode) must be mapped to model pin 1 (anode), and schematic pin 3 (cathode) must be mapped to model pin 2 (cathode), this would be entered into the database field as:

    (1:1),(3:2)

  • Sim Excluded Parts – create this field in the database if you wish to exclude certain parts of a multi-part component from being simulated. This information corresponds to the Exclude part from simulation option in the Pin Mapping region of the Sim Model dialog.

    By default, all parts of a multi-part component are included in a simulation, so you only need to specify the parts you wish to exclude, by number. Separate multiple parts in the exclusion list using commas. For example, if a component has four parts and you do not want parts 2 and 4 to be included in any simulation, then you would enter the following into the database field:

    2,4

  • Sim Parameters – create this field in the database if you wish to assign values to simulation parameters for the model. These are parameters that can be defined at the component level, as opposed to the more advanced parameters that can be included in a model file.

    A parameter must be entered in the following format:

    ParameterName=Value,

    Multiple parameters must be separated by the pipe character (|).

    You may remember that a component-level simulation parameter can also be set as a component parameter - appearing in the Parameters region of the associated Component Properties dialog, with the ability to then be displayed on the schematic sheet. By default, a parameter entry in the Sim Parameters field will be automatically added as a component parameter. If you do not want a simulation parameter to be added as a component parameter, simply add an exclamation mark prefix to the parameter name (e.g., !Initial Voltage=100mV).

    Consider a diode model, which has the following four component-level parameters:

    • Area Factor
    • Starting Condition
    • Initial Voltage
    • Temperature.

    Now consider adding values in the database for the Area Factor (say 2) and Temperature (say 22°C). Also, both of these should not be added as component parameters. The entry in the Sim Parameters field would be:

    !Area Factor=2|!Temperature=22

Once you have placed the component from the database library, you can verify that the information defined for the simulation link is indeed as required. When the placed component is selected in the design space, select the simulation model entry in the Parameters region of the Properties panel, click the  button to access the Sim Model dialog, from where you can check that:

  • The model file has been located as expected. When found, the Model File tab of the dialog will display the content of the file.
  • The remaining simulation information from the database has been added to the dialog as expected.

The values stored in the database fields will be used for the component placed from the database library when running a simulation. Note however that if you access the Sim Model dialog for a simulation model for a component placed from a database library and click OK, the Sim Netlist and Sim Spice Prefix fields will be set automatically for that component based on the chosen model text.

Parameters

All other database field names will be automatically mapped to design parameters using the same names. For example, if a field in the database is called Tolerance, a design parameter with the name Tolerance will be mapped to it. You can change the name for a design parameter by clicking in its cell and typing the new name directly. It is these design parameter names that will appear in the Parameters region of the component's associated properties dialog, once it has been placed on a schematic sheet.

You may have a large number of data fields associated with a component in the database, not all of which you will want, or even need, added as design parameters to the component when placed on a schematic sheet. Much of this information may only be required when generating a Bill of Materials. The Report Manager dialog allows you to add parameter information to a BOM, directly from a linked database - allowing you to reduce the amount of information that gets 'carried' with the schematic source documents. For more information, refer to the section Preparing a BOM in the Report Manager.

For fields that you explicitly do not want mapped from the database, set the Design Parameter entry to [None]. Unmapped database fields are distinguished on the tab by the use of a red cross icon (Cross icon, indicating that a database field is not mapped to a component parameter). Mapped database fields are distinguished by a green tick icon (Tick icon, indicating that a database field is mapped to a component parameter).

Example of how to un-map a database field from a component parameterConfigure parameter mapping as required. Set to [None] to prevent a parameter in the database being mapped to the placed component.
Un-mapped parameters can be included directly in the BOM, if required.

To quickly remap an unmapped field, click inside the row for that field and use the Ctrl+D keyboard shortcut. Note that for model mappings you will need to manually select from the associated Design Parameter drop-down.

Parameter Update Options

The remaining columns on the Field Mappings tab allow you to specify the actions taken for parameters, when placing a component from the database library for the first time, or updating a component after it has been placed using the Tools » Update Parameters From Database command.

The four columns are as follows:

  • Update Values - a cell in this column is used to determine the action that should be taken if the parameter exists both on a schematic sheet and in the database, but the values are currently different. Choose to update the parameter of the placed component with the value stored in the database (Update), or not to update at all (Do not update). This option is obeyed when using the Update Parameters From Database command, after the component is placed.
  • Add To Design - a cell in this column is used to determine the action that should be taken if the parameter is found in the database, but does not exist for the placed component. You can choose to add the parameter (Add), not add the parameter (Do not add), or add the parameter only if it has a value assigned to it in the database (Add only if not blank in database). This option is obeyed both when initially placing the component from the database library and when using the Update Parameters From Database command, after the component has been placed.
  • Visible On Add - a checkbox in this column is used to determine whether a newly added parameter, resulting from initial placement or update after placement, is made visible for the component on the schematic sheet (enabled) or not (disabled).
  • Remove From Design - a cell in this column is used to determine the action that should be taken if the parameter is found to exist for the placed component, but either is not in the database, or is, but has no value. You can choose to not remove the parameter at all (Do not remove), or only remove it if it has no value assigned to it in the database (Remove only if blank in database). This option is obeyed when using the Update Parameters From Database command, after the component has been placed.

Initially, the Update Values, Add To Design, and Remove From Design fields - for each mapped database field - will be set to the entry Default, and the Visible On Add option will be disabled, as illustrated in the following image.

Initial (default) parameter update options.Initial (default) parameter update options.

Looking at the image, there are four important points to make regarding update options:

  1. Unmapped database fields will have no associated update options.
  2. Attribute and Model based mappings (entries with square brackets in the Design Parameter column) will have no associated update options, as these are not design parameters.
  3. The key field (e.g. Part Number in the image) will have no associated update options. This field is solely used for parameter matching purposes.
  4. A setting of Default causes an update option to follow its corresponding default definition, as specified on the Default Actions tab of the Database Library Options dialog (Tools » Options from the main menus or Options from the right-click menu of the Table Browser tab). This dialog can also be accessed by clicking the Options button in the Field Settings region of the document view.

Define default parameter update options in a central location for a DbLib. Hover over the image to see the equivalent for an SVNDbLib.Define default parameter update options in a central location for a DbLib. Hover over the image to see the equivalent for an SVNDbLib.

The fourth point is beneficial in that it allows you to specify update options from a central location, and then point to that location when defining the update options for each mapped field. That is why the Default entry is loaded automatically into the relevant update fields upon mapping a database field to a design parameter.

Should you wish to override the default setting for an update option, click inside the relevant update field, on the Field Mappings tab, then click again to access a drop-down providing the applicable update choices.

Parameter update options can be manually overridden, if required.Parameter update options can be manually overridden, if required.

In this way, you have full control over how the parameters in the design are updated. You can set all fields to Default and make the required update decisions from the Database Library Options dialog, set each update field individually, or have a mixture of the two - the decision is entirely yours to make as you see fit. For placed components the update, when performed, is carried out through use of an Engineering Change Order dialog. If at this stage there are updates that you would prefer not to make, you can opt to not include those particular changes - giving you the final, and ultimate say, in which design parameters get updated.

Specifying Symbol and Model Library Locations

When you place a component from a database library its symbol - specified by the [Library Ref] mapping - is extracted from the specified schematic library (*.SchLib). Similarly, any model references (footprint, PCB3D, simulation) specified in the database will reside in underlying PCB Library (*.PcbLib), PCB3D Library (*.PCB3DLib) and Simulation Model (*.mdl, *.ckt) files. The paths to these files can be specified explicitly in the database by:

  • Entering an absolute path to the file.
  • Entering a relative path to the file.

If you have defined fields in your database for path information, these fields need to be mapped to the appropriate design parameters - [Library Path], [Footprint Path], [PCB3D Path], [Sim File], and so on (refer back to Model and Parameter Mapping).

Entering paths - even relative - in a database table can be a little restrictive. If you move the location of a library or model file, you would need to update the database table accordingly. To give you greater freedom, you have the ability to specify library search information within the DbLib/SVNDbLib file itself. This allows you to specify the name of the source library or model file in the database, or not to define it at all.

Using Search Paths with a large number of symbol/model files - while search paths offer greater flexibility and simplicity for configuring how the symbols and models are located, this approach is not recommended when there are a large number of symbol or model files present in the search location. Depending on the file naming scheme used, Search Paths can require that every library/model file present in the path is searched every time a symbol/model is required, for example when browsing components or transferring the design from schematic to PCB.

For a Database Library

For a DbLib, library search paths are defined on the Symbol and Model Search Paths tab of the Database Library Options dialog (Tools » Options). This dialog can also be accessed by clicking the Options button in the Field Settings region of the document view.

Specifying search paths for symbol and model libraries.Specifying search paths for symbol and model libraries.

To add a path to the list:

  1. Either type the path directly into the field below the Library Search Paths region, or click on the Browse for a folder button button to access the Browse for Folder dialog, from where you can locate the directory in which the required library/model file(s) reside.
  2. You can add either as a full path, or as a relative path (relative to the location of the DbLib file). Control this using the Add/Update As Relative Path option.
  3. After specifying the required path, add it to the search paths list by clicking the Add button.
  4. Continue adding additional search paths as required.
For direct entry, if you specify an incorrect path (e.g. to a folder that does not exist) the entry can still be added but will appear grayed-out in the list, to indicate that it is an invalid search path. If you find that you have entered a path erroneously, you can select it in the list and either click the Remove button, or modify its path definition and click the Update button.

The library search paths determine where library and model files can be found when placing form the database library and when searching for a model after placement. The specific model that is used will depend on how you have set up your library search paths and whether you have added specific library information into your database. The searching will proceed in the following order:

  1. If a full path exists in the mapped path field for the symbol or model, use that library/model file and extract the symbol or model specified in the applicable reference field.
  2. If a relative path exists in the mapped path field for the symbol or model, use that library/model file and extract the symbol or model specified in the applicable reference field.
  3. If only a library/model file name exists in the mapped path field for the symbol or model, use the search paths to locate the first library/model file that matches the specified name and which contains a match for the symbol or model specified in the applicable reference field.
  4. If no library/model file information exists in the database, use the search paths to locate the first library/model file containing a match for the symbol or model specified in the applicable reference field.

For an SVN Database Library

For an SVNDbLib, the base directories within the Subversion repository - in which the symbols and footprint models reside - are specified on the SVN Repository tab of the Database Library Options dialog (Tools » Options). This dialog can also be accessed by clicking the Options button in the Field Settings region of the document view.

Specifying base repository directories for symbols and footprints.Specifying base repository directories for symbols and footprints.

Use the available fields in the Models Location region to specify the base directory for the symbols and footprints. Click the Click the ellipsis button to select the repository folder for the symbols and footprints button at the right of a field to access the Browse for directory dialog - a window into the linked repository. Use this dialog to select the required folder.

Browsing for the relevant directory in the linked SVN repository.Browsing for the relevant directory in the linked SVN repository.

It is important to stress that the symbols and footprints must reside within the base repository directories specified. They can of course be in sub-folders of those directories and the paths specified for both symbols and footprints can point to the same directory in the repository.

The model locations determine where library and model files can be found when placing form the version-controlled database library and when searching for a model after placement. The specific schematic symbol and footprint model(s) used will depend on how you have set up these locations, and whether you have added specific library information into your database. The searching will proceed in the following order:

  1. If a full path exists in the mapped path field for the symbol or footprint model (e.g. http://MyServer/svn/MyCompany/ParentDirectory/SchematicSymbols/Capacitor_NonPolarized.SchLib), use that library file and extract the symbol or footprint specified in the applicable reference field.
  2. If a relative path (relative to the root of the repository) exists in the mapped path field for the symbol or footprint model (e.g. /ParentDirectory/SchematicSymbols/Capacitor_NonPolarized.SchLib), use that library file and extract the symbol or footprint specified in the applicable reference field. The URL for the repository - specified in the Repository Server Connection region of the dialog - will be prefixed to the path you enter, to give the absolute address.
  3. If only a library file name exists in the mapped path field for the symbol or footprint model (e.g. Capacitor_NonPolarized.SchLib), use the specified model locations within the repository to locate the first library file that matches the specified name, and which contains a match for the symbol or footprint model specified in the applicable reference field.
When searching for a symbol/model match, the flattened folder paths in the base symbol or footprint directory are sorted and searched alphabetically. If the Library Splitter Wizard is used, there will always be a corresponding library with the name of the actual symbol/footprint.
  1. If no library file information exists in the database, use the specified model locations to locate the first library file containing a match for the symbol or footprint model specified in the applicable reference field.
When locating the symbol/footprint, the system will initially look for the first library named like the symbol or footprint itself. For example, if the logical symbol name in the database (specified by the [Library Ref] mapping) is Capacitor_NonPolarized, the system will look for the first file named Capacitor_NonPolarized.SchLib and look for the symbol within this file. If the symbol/footprint cannot be found in this way, the system will look for a match in all libraries.
If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Примечание

Набор доступных функций зависит от вашего уровня доступа к продуктам Altium. Ознакомьтесь с функциями, включенными в различные уровни Подписки на ПО Altium, и функциональными возможностями приложений, предоставляемых платформой Altium 365.

Если вы не видите в своем ПО функцию, описанную здесь, свяжитесь с отделом продаж Altium, чтобы узнать больше.

Content