Средства преобразования библиотек на основе баз данных
Altium Design Software provides the ability to place components directly from a company database by creating and using a database library. The type of database library used will depend on how you want to handle your source symbol and model libraries. If the libraries are to be kept in a location on a hard disk or network drive, you would simply use a Database Library (DbLib). If, on the other hand, you want to place your libraries under source control using a Subversion repository you would use an SVN Database Library (SVNDbLib).
Regardless of the type of database library used, the underlying principal of the feature remains the same in each case - the ability to place directly from the linked external database. To make this powerful feature as accessible as possible, tools are provided that enable you to quickly move existing libraries into the database library structure. These tools allow you to migrate from:
- An Integrated Library to a Database Library (DbLib or SVNDbLib).
- A Database Library (DbLib or SVNDbLib) to an Integrated Library.
- Source Schematic/PCB libraries to an SVN Database Library.
- A Database Library to an SVN Database Library.
- An OrCAD Component Information System (CIS) to a Database Library (DbLib).
The following sections take a closer look at how these migrations are performed within the software.
Creating a Database Library from an Integrated Library
Integrated libraries are, by nature, inherently secure. Added to this is their ideal portability for designs that leave your company site. If the design is to be kept on-site and/or you want to have your Altium Design components tightly coupled to your company database, then Database Libraries are the perfect choice. The software provides the ability to quickly convert your company integrated libraries into the Database Library (DbLib) or SVN Database Library (SVNDbLib) structure . Multiple integrated libraries may be included in the conversion, with each one being added as a separate table to the target database.
Converting to a DbLib
Creating a standard database library (DbLib) from an integrated library (IntLib) is performed using the Integrated Library to Database Library Translator Wizard. The wizard essentially decompiles nominated integrated libraries, with each library used to build a separate database table in a chosen target database, complete with parameter and model information extracted from the components within. A specified database library file is then used to provide a connection to that database.
Bringing one or more source integrated libraries into the database library structure is a streamlined process, using the Integrated Library to Database Library Translator Wizard.
The process involves the following steps:
- Create a new or open an existing database library file (*.DbLib). Typically, you would use an existing DbLib file when converting one or more integrated libraries into an existing Access database to which that DbLib file is currently connected.
- With the Database Library file (*.DbLib) open as the active document, choose the Tools » Import From Integrated Libraries command from the main menus to access the Integrated Library to Database Library Translator Wizard.
-
Use the initial Specify your Database details page of the Wizard to specify the target database - either a new Access database or an existing one. If creating a new database, click on the folder symbol to the right of the Database Location field to access a standard Open dialog. Use this dialog to determine where and under what name the new database is to be created. The chosen name/path will be entered into the Database Location field.
-
Use the next Specify your Target Database Library page of the Wizard to specify the target database library file. Either specify the path and name for a new DbLib file to be created or browse to and open an existing file. Typically, you would use an existing DbLib file when converting one or more integrated libraries into the existing Access database to which the DbLib file is currently connected. By default, the active DbLib file will be prefilled into the field.
-
Use the following Locate the Integrated Libraries to Import page of the Wizard to specify the integrated libraries that you want to convert. Use the Add button to open the Select Source Integrated Libraries dialog from where you can browse to and select the required libraries. The constituent schematic symbol and model libraries (where they exist) will be extracted and saved into the location specified in the Destination Folder field. Use the Remove and Clear buttons to remove or delete the selected library.
-
After choosing the source integrated libraries, click Next to proceed with the conversion. A progress bar will be displayed along with information on the current library being translated. After the conversion has completed, click Finish on the last page of the Wizard to make the specified DbLib file active in the main design window (if not already).
Resulting DbLib file after the translation process has completed.
With the translation process complete, you can then go into the source schematic libraries and remove all parameter and model information from the symbols. Then you can make any fine-tuning configuration changes to the field mappings in the DbLib document to reference the appropriate database columns, as required. For more information, refer to the Mapping Database Fields to Design Parameters section of the Creating & Defining the Database Library page.
Converting to an SVNDbLib
Creating a version-controlled database library (SVNDbLib) from an integrated library (IntLib) is performed using the SVN Database Library Conversion Wizard. The Wizard essentially decompiles nominated integrated libraries with each library used to build a separate database table in a new target database complete with parameter and model information extracted from the components therein. A specified SVN database library file is then created, which is used to provide connection to that database. The constituent Schematic and PCB libraries are split and committed to specified directories in a nominated SVN version control repository, which are referenced by the SVNDbLib file.
Bringing one or more source integrated libraries into the SVN database library structure is a streamlined process, using the SVN Database Library Conversion Wizard.
The process involves the following steps:
- Access the SVN Database Library Conversion Wizard. This is done by:
- Choosing the Tools » SVN Database Library Maker command from the schematic library editor, PCB library editor, or database library editor main menus.
- In the Projects panel, right-clicking on the entry for a project library (SchLib, PcbLib, or IntLib) then choosing the SVN Database Library Maker command from the context menu.
- Use the Libraries to Convert page to specify the integrated libraries that you want to convert. The list will initially be pre-populated with one or more libraries (the active library or all project libraries that have been added to the project depending on the method of access used). Remove these from the list before choosing the integrated libraries you want to convert. Use the Add button to access the Library Files dialog from where you can browse to and select the required integrated libraries.
-
Use the Options page to define conversion-related options including how the source libraries should be split, in which directories of which repository they should be stored, and the output directory for the SVNDbLib file. For a schematic library, two options are also provided that allow you to strip the parameter and/or model information from each constituent component leaving just the bare symbol.
- After choosing the source integrated libraries and setting the related conversion options as required, click Next to proceed with the conversion. A progress bar will be displayed along with information on the current library being converted. The conversion process involves:
- Extraction of the source libraries from the supplied integrated libraries.
- Splitting the schematic and PCB libraries into single symbol/footprint library files.
- Committing the split symbol and footprint libraries to the repository in the specified base directories.
- The Wizard will only extract footprint model reference information. 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. Where such links exist, they will be added as parameters.
- Building a separate database table in the generated Access database (which takes the same name as that specified for the SVNDbLib) for each integrated library being converted, complete with parameter and model information extracted from the components therein. Each table is named using the name of the name of the integrated library with an _IntLib suffix (e.g., Capacitor - Ceramic_IntLib).
- Creating the specified SVNDbLib file, connecting to the database and repository.
- After the conversion has completed, click Finish to close the Wizard and make the SVNDbLib file the active document.
Resulting SVNDbLib file after the conversion process has completed.
Creating an Integrated Library from a Database Library
Database Libraries are an ideal choice if you want your Altium Design components to be tightly coupled to your company database. If the design needs to leave your company site or if you prefer to have your designers work from secure integrated libraries, this can be readily achieved. The software provides the facility to compile an integrated library directly from a database library either a standard database library (DbLib) or a version-controlled SVN database library (SVNDbLib). In this way, your CAD librarians can still use database libraries, while your designers use regularly-regenerated integrated libraries working in an 'offline' fashion as it were.
Conversion is performed using the Offline Integrated Library Maker. The process is carried out on a per-database table basis with full control over which tables in the database are considered. Schematic components, PCB, PCB3D, and simulation models are included in the conversion process. A separate integrated library will be generated for each included table. Those tables are translated as individual integrated libraries that are then added to the Installed Libraries.
Convert your database libraries (DbLibs or SVNDbLibs) to 'offline' integrated libraries using the Offline Integrated Library Maker.
The process involves the following steps:
- With the Database Library file (*.DbLib) or SVN Database Library file (*.SVNDbLib) that you want to convert open as the active document, choose the Tools » Offline Integrated Library Maker command from the main menus to access the Offline Integrated Library Maker.
-
Use the Library to Convert page to specify the DbLib or SVNDbLib to be processed. The active library from which the Offline Integrated Library Maker was accessed will be specified as the library to convert by default. You can freely browse for and choose a different database library if required.
-
Use the Options page to specify which of the tables in the linked database are to be included in the conversion. All database tables are included by default. To exclude a table, ensure that its associated Convert option is disabled. This page also enables you to nominate an output directory in which the generated integrated libraries will be stored. Enter the path to this base directory directly or click the
icon to the right of the field to access a dialog from where you can browse to and select the required directory. The generated output (integrated library) for each included database table will be stored in its own sub-folder within the specified output directory, which is named using the table's name.
- After choosing the database library and setting the related conversion options as required, click Next to proceed with the conversion. A progress bar will be displayed along with information on the current database table being converted. Remember that the conversion process is carried out for each database table you have nominated to convert. The following is essentially a breakdown of this process:
- An integrated library package (*.LibPkg) is created and opened in the Projects panel. The package is named using the name of the table. For a table named Capacitor - Ceramic, for example, this would give Capacitor - Ceramic.LibPkg.
- A schematic library document is created and added to the LibPkg. The schematic is again named using the table's name (e.g., Capacitor - Ceramic.SchLib).
- Each record in the table is then considered and the appropriate Altium Design component is built. To do this, the referenced schematic symbol is retrieved from the appropriate source library and added as a component to the new schematic library document. Parameter and model link information defined in the record is then added to that component.
- The referenced footprint model(s) for the record are retrieved and added to a PCB library document. This document is again named after the table (e.g., Capacitor - Ceramic.PcbLib). The PCB library document is then added to the LibPkg.
- If the source library is a DbLib, and Simulation model links have been defined in the database record, the referenced Simulation model files are also added to the LibPkg. The location of such models remains unchanged. The full path to a model is specified as part of its corresponding model link.
- The LibPkg is then compiled to give the integrated library (e.g., Capacitor - Ceramic.IntLib), which is subsequently added to the software's Installed Libraries.
Results of the conversion process - library package projects with constituent symbol and footprint model documents, and the compiled IntLibs, which are also added as installed libraries, and therefore made available to all PCB design projects.
Creating an SVNDbLib from Source Libraries (SCHLib/PCBLib)
The SVN Database Library Conversion Wizard helps you convert your schematic, PCB, database and integrated libraries into SVN database libraries. This Wizard streamlines the process of turning various component management methodologies into an SVN Database Library (*.SVNDBLib). An SVN Database Library takes the ability to place components directly from a database and extends this method of linking to allow source-controlled libraries - housing the schematic symbols and footprint models within a Subversion-based repository. The link to the repository and to the external database is defined within an SVN Database Library file (*.SVNDBLib), an extension of the Database Library file (*.DBLib) and often referred to as a Version-Controlled Database Library.
Use the Wizard to define conversion-related options including how the source libraries should be split, in which directories of which repository they should be stored, and the output directory for the SVNDBLib file.
You will need to choose which database or schematic (*.SchLib), PCB (*.PcbLib) or integrated libraries (*.IntLib) to convert which will then be checked into an SVN repository. A single SVN database library will also be created.
With this Wizard, you have the option to define the connection to the SVN repository, the base directory for symbols and models, and the path to the SVN database library document. By default, the output directory will be set to the same directory in which the source library is stored.
Should you wish to have the generated SVNDBLib file and the database in the same location, you basically have two options. The first is to set the output path for the SVNDBLib to be the same directory in which the database currently resides. The second option is to generate the SVNDBLib in a different directory and then move the database to that directory. In this case, you will need to remember to modify the connection within the SVNDBLib file to point to the database in its new location and reconnect.
Bringing one or more source schematic and PCB libraries into the SVN database library structure is a streamlined process using the SVN Database Library
Conversion Wizard.
The process involves the following steps:
-
Open the SVN Database Library Conversion Wizard in the following ways:
- Click Tools » SVN Database Library Maker from a schematic library file (*.SchLib), a PCB library file (*.PcbLib), an integrated library file (*.IntLib), or a database library file (*.DbLib). However, if you want to involve the linked footprint models in the conversion when accessing the Wizard from a schematic library, you will need to browse for and add the respective PCB footprint library(ies). Also, conversion of the PCB footprint libraries alone is not a typical scenario and you will therefore need to browse for and add the respective schematic component libraries.
- From the Projects panel, right-click on the entry for the required library (*.SchLib, *.PcbLib, or *.IntLib) then select SVN Database Library Maker. The Wizard will automatically load all project libraries. This is by far the easiest method and requires that the source schematic and PCB libraries are added to a project. Quite often, this will be the case when integrated libraries have not been used.
-
Use the Libraries to Convert page to select the libraries you want converted. Choose from Database Libraries or Schematic, PCB, and Integrated Libraries. The selected libraries will be split into individual component libraries and then be checked into an SVN repository. A single SVN database will be created.
-
Converting a Database Library
When converting Database Libraries, the conversion process involves:
- Splitting the schematic and PCB libraries referenced by the component records in the linked database into single symbol/footprint library files.
- Committing the split symbol and footprint libraries to the repository, in the specified base directories.
- Creating the specified SVNDBLib file, connecting to the database and repository.
-
Converting Schematic, PCB, and Integrated Libraries
Use the Add button to access a standard dialog to search for and select the desired file to add. Click the Remove button to remove the currently selected library.
When converting Schematic, PCB, and Integrated Libraries, the conversion process involves:
- Extraction of the source libraries from any supplied integrated libraries.
- Splitting the schematic and PCB libraries into single symbol/footprint library files
- Committing the split symbol and footprint libraries to the repository in the specified base directories.
- The Wizard will only extract footprint model reference information. Linked PCB3D and Simulation models are not supported for an SVNDBLib. Where such links exist, they will be added as parameters.
- Building a separate database table in the generated Access database for each schematic library and/or integrated library being converted, complete with parameter and model information extracted from the components. Each table is named using the name of the schematic library, with an _SchLibsuffix (e.g., Mixer_SchLib), and/or the name of the integrated library, with an _IntLib suffix (e.g., AD Differential Amplifier_IntLib).
- Creating the specified SVNDBLib file, connecting to the database and repository.
-
-
Use the Options page to define conversion-related options, including how the source libraries should be split, in which directories of which repository they should be stored, and the output directory for the SVNDbLib file. For a schematic library, two options are also provided that allow you to strip the parameter and/or model information from each constituent component, leaving just the bare symbol.
SVN Options
Use this region to define the settings for connecting to the SVN Repository.
Use the Method drop-down to select the method of connection: file (a file-based repository), http (a cloud-based repository, https (a secure cloud-based repository), svn, or svn+ssh.
The Location region (available only when file is selected for Method) is used to set the location path of the repository. Use the browse folder icon to search for and select the desired location.
The Server region (available only when file is not selected for Method) is used to set the desired server.
Set the Server Port to either Default or Non-Default. If Non-Default is selected, enter the server port in the text box. You will also need to enter the name of the Repository folder in the text box.
Designate the repository base directory for Symbols and Footprints by clicking ... to search for and select the desired folders for both.
SVN DB Library Options
The SVN DB Library Options region allows you to specify the path of the SVN database library document. If no back-end Access database currently exists, one will be created in the same folder. Use the browse folder icon to search for and select the path.
Library Splitting Options
Use the drop-down to select if you want the files to Overwrite Existing Files or Append Incrementing Number To File Names (to create newly-appended files when the libraries split). When Overwrite Existing Files is selected, any existing files in the repositories will be over-written when the libraries are split. If Append Incrementing Number To File Names is selected, all the files in the specified repositories will be protected and will not be over-written and new component libraries with the same name will be appended with the suffix "
_#IncrementNumber
".For a schematic library, two options are also provided that allow you to strip the parameter and/or model information from the split schematic components, leaving just the bare symbol. Select Remove All Parameters and/or Remove All Models. Since the external database already exists - linked to the original DBLib file - one will not be created. The database will remain in its current location.
- After choosing the source schematic and PCB libraries and setting the related conversion options as required, click Next to proceed with the conversion. A progress bar will be displayed, along with information on the current library being converted. The conversion process involves:
- Splitting the schematic and PCB libraries into single symbol/footprint library files.
- Committing the split symbol and footprint libraries to the repository, in the specified base directories.
- The Wizard will only extract footprint model reference information. 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. Where such links exist, they will be added as parameters.
- Building a separate database table in the generated Access database (which takes the same name as that specified for the SVNDbLib) for each schematic library being converted, complete with parameter and model information extracted from the components therein. Each table is named using the name of the schematic library with an _SchLib suffix (e.g., Capacitor - Ceramic_SchLib).
- Creating the specified SVNDbLib file, connecting to the database and repository.
- After the conversion has completed, click Finish to close the wizard, and make the SVNDbLib file the active document.
Resulting SVNDbLib file after the conversion process has completed.
Converting a DbLib to an SVNDbLib
You may already be enjoying the power of the Database Library feature after having converted your existing integrated libraries to the DbLib structure or having created a DbLib from scratch. Extending on this, you may want to move your source symbol and footprint libraries under the protective and secure wing of a source control repository. The software provides the means to effect this migration from your current standard database library (DbLib) to a version-controlled database library (SVNDbLib).
Conversion is performed with the SVN Database Library Conversion Wizard in much the same way as when converting an integrated library.
Converting an existing standard database library (DbLib) to a version-controlled database library (SVNDbLib) is a streamlined process using the SVN Database
Library Conversion Wizard.
The process involves the following steps:
- Open the existing DbLib to be converted then choose Tools » SVN Database Library Maker from the main menus. The SVN Database Library Conversion Wizard will open.
- Use the Libraries to Convert page to specify the source database library that you wish to convert. The Database Libraries option will already be enabled, with the associated field pre-populated with the path to the active library. If you want to convert a different DbLib, click the
button and use the resulting dialog to browse for it.
- After clicking Next, the chosen DbLib file is analyzed and a confirmation dialog appears, notifying you that the backend database may be modified. Click Yes to continue.
- Use the Options page to define conversion-related options including how the source libraries should be split, in which directories of which repository they should be stored, and the output directory for the SVNDbLib file. For a schematic library, two options are also provided that allow you to strip the parameter and/or model information from each constituent component leaving just the bare symbol.
- After choosing the source DbLib file and setting the related conversion options as required, click Next to proceed with the conversion. A progress bar will be displayed along with information on the library being converted. The conversion process involves:
- Splitting the schematic and PCB libraries, referenced by the component records in the linked database, into single symbol/footprint library files.
- Committing the split symbol and footprint libraries to the repository in the specified base directories.
- Creating the specified SVNDbLib file, connecting to the database and repository.
- After the conversion has completed, click Finish to close the Wizard and make the SVNDbLib file the active document.
Resulting SVNDbLib file after the conversion process has completed.
A Word about Field Mappings
In the generated SVNDbLib, the mappings defined between fields in the database and design parameters on the Field Mappings tab remain as they were originally defined in the DbLib.
Field mappings remain the same between the original DbLib and the generated SVNDbLib.
There are, however, two important areas to highlight:
- Any defined path mappings for symbols and footprint models are ignored. The SVNDbLib uses only the mapped reference fields - [Library Ref] and [Footprint Ref] - for locating the required symbol and footprint within the libraries committed to the repository. The path information defined in the database is ignored as it points to libraries located on a hard disk or other local/network medium.
- Any defined simulation model mappings also will remain defined in the SVNDbLib file. However, storage of simulation model files in the Subversion repository is not supported. Although the model links will be added to a component instance when placed, the models themselves will not be found.
Direct OrCAD® CIS Support
Built on the foundation of the database library system, the software provides full support for connection to and use of existing OrCAD Component Information Systems (CIS). The CIS structure is essentially converted into Altium Designer's Standard Database Library structure (DbLib).
From OrCAD to Altium Designer - Translations Required
To provide the facility for direct placement from the external database (*.mdb, *.xls), the following file translations are required:
- The OrCAD CIS Configuration File (*.dbc), which handles the link to the external database and includes the database field-to-design parameter mapping information, must be translated into an Altium Designer Database Library file (*.DbLib).
- The relevant OrCAD library files must be translated into Altium Designer library files:
- OrCAD Capture Library (*.olb) ---> Schematic Library (*.SchLib).
- OrCAD Max Library File (*.llb) ---> PCB Library (*.PcbLib).
Creating the Database Library Automatically
The simplest and most efficient method to create the DbLib file and source Altium Designer libraries is to use the Import Wizard (File » Import Wizard). On the second page of the Wizard, ensure that the OrCAD CIS Configuration Files and Libraries entry is selected as the import file type.
Follow the subsequent pages of the Wizard in which you are required to specify:
- The location of the external database.
- The location of the CIS Configuration File (*.dbc) - remember this must be in binary format and not XML.
- Where and under what name the target DbLib file is to be created.
- The OrCAD Schematic and/or PCB libraries referenced by the external database.
After specifying the source and target files and directories as required, click Next to proceed with the import. After the import is completed, click Finish to close the Wizard and make the DbLib file the active document.
Resulting DbLib file, after the import process has completed.
Resulting DbLib file, after the import process has completed.
Things to be aware of:
- A library search path is automatically added to the DbLib file on the Symbol & Model Search Paths tab of the Database Library Options dialog, which points to the directory containing the translated library files.
- The parameter mapping information - including the defined lookup key - is taken directly from the OrCAD CIS Configuration file.
- Two model mapping entries are automatically set. Example database field names for these and the Design Parameter entries assigned are:
- Footprint Name ---> [Orcad Footprint]
- Symbol Name ---> [Orcad Library]
These entries provide the link to the source schematic symbol for a particular component record in the external database and the applicable PCB Footprint model linked to that component.
- Determine mapped parameter update options as required. For more information, refer to the Mapping Database Fields to Design Parameters section of the Creating & Defining the Database Library document.
Creating the Database Library Manually
- Creation of the DbLib file using the Import Wizard is the fastest method, but not the only method. You also can create the DbLib file manually. To do so:
- Create a new DbLib file, connecting it to the external database, and defining the mapping and parameter update options as required.
- You will then need to import the OrCAD libraries. This can be achieved by using the Import Wizard to translate the OrCAD library files (*.olb, *.llb) into Altium Designer libraries (*.SchLib, *.PcbLib).
- When choosing the file types to import, select the OrCAD Designs and Libraries Files entry.
- Skip the page for Importing OrCAD Designs and proceed to the page for Importing OrCAD Libraries. Add all source OrCAD libraries referenced by the database.
- Skip other subsequent pages relating to the import of design files.
- On the Output Library Options page, leave the default Output Libraries as PCB Project option enabled.
- On the Output Libraries page, specify the output directory for the generated library files.
- After the import is complete, a folder titled Imported OrCAD Libraries.PrjPcb will be generated in the nominated directory. You can move the generated Altium Designer libraries to another location as required. For example, you may want to move the libraries to a folder named Libraries created within the directory containing the DbLib file.
- Once you have the symbol and footprint libraries, you will need to go back to the DbLib file and set up the library search paths (on the Symbol & Model Search Paths tab of the Database Library Options dialog) to point to the directory folder in which those libraries are stored.