Database Library Migration Tools Available in Altium Designer
Parent page: Working with Database Libraries
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.
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 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 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. By default, the active DbLib file will be prefilled into the field.
- Use the following 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.
- 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).
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 Working with Database Libraries document.
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.
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.
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. A separate integrated library will be generated for each included table.
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.
Creating an SVNDbLib from Source Libraries (SCHLib/PCBLib)
You may have opted to use source schematic and PCB libraries added to the design project rather than compiling them into an integrated library. Perhaps you want to edit the source components in these libraries frequently and prefer not to decompile and recompile the corresponding IntLib each time. Version-controlled database libraries (SVNDbLib) offer a similar deal - the ability to quickly access the source libraries for modification, coupled with the security of having those libraries stored in a source control repository.
The software facilitates the quick and simple conversion from your existing source schematic and PCB libraries into the SVN Database Library structure. Conversion is performed using the SVN Database Library Conversion Wizard in much the same way as when converting an integrated library. Multiple libraries of each type may be included in the conversion with each schematic library added as a separate table to the target database.
The process involves the following steps:
- Open the SVN Database Library Conversion Wizard in the following ways:
- From the schematic library editor - with the source schematic library open, click Tools » SVN Database Library Maker from the main menus. However, if you want to involve the linked footprint models in the conversion, you will need to browse for and add the respective PCB footprint library(ies).
- From the PCB library editor - with the source PCB library open, click Tools » SVN Database Library Maker from the main menus. However, 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 a library file then choose the SVN Database Library Maker command from the context menu. 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 specify the source schematic and PCB 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). Modify the list as required. Use the Add button to open a dialog from where you can browse to and select required source schematic and PCB 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 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.
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.
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.
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.
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.
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 Working with Database Libraries 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.