Problems using SVNDBLib for library management - Page 1
Forum section: electronics / general

author: dboyer
author_rank: Contributor
timestamp: March 21, 2014, 04:49:41 pm
content: I've been exploring improvements to our workflow and data management and adopting version control via SVN seems like a great move in the right direction. I come from a bit of a software background and while I am a bit nervous about using SVN to store binary blobs and relying on Altium's internal tools for diffs, it seems better than any other option available. On my newest project, I've been committing to SVN regularly and the integration for working with a single schematic/pcb project seems to work pretty well. Version control shines when integrating multiple developers, so we'll see if that ends up happening at all with our current style of one engineer per pcb. Anyways, as well as that works my moves towards moving our disjointed libraries to a single SVNDBLib has not been successful.First of all, let me point out that I have not been able to find Altium's reference library anywhere. Their site seems to have gone through a bit of an overhaul and I'm not sure where they stuck it. If anyone knows where it is, I'd love to take a gander. In the meantime however, I've been having trouble getting it figured out just using the tutorial information. It could very well be that I am missing some fundamental understanding of how Altium tracks library sch/pcb component relationships so please feel free to correct any misconceptions I have.To build the library, I first created a mdb database with Access and added a /Library/sch and /Library/pcb folder to SVN. The database has a couple different tables to organize the parts into reasonably specific categories (connector, regulator, etc), and fields were added to each table. This part I am a bit unsure of - it seems like for the most part you can add lots of additional fields that hold whatever data you want, but there are a few fields that need to be specified. I feel like this may be a point at which I've screwed up. Here is an example table, the connector table:Description | Symbol | Footprint | Part Number | Type | Manufacturer | RoHSIt's a pretty minimal list, but I figured would be sufficient for connectors. I created an SVNDBlib and pointed it at the mdb file and the subversion server and directories. All of this appears to be correct as it can find and download the SVN folders and see the database tables. I set the description field as , the symbol as [library ref] and the footprint as [footprint ref]. I also set the part number field as the single key lookup. To create my first symbol/footprint I created both manually in the correct directories in my working folder, and then added a component in the SVNDbLib table browser with the symbol and footprint matching the names for the sch/pcb library items I just made. I can right click in the SVNDbLib table browser and go to 'open symbol' and 'open footprint' and open them just fine. This is where everything goes badly though.I'm not sure if you do this with an SVNDbLib, but I can't 'Add Footprint' within the schlib file I created as it can't find any footprints. I was having trouble adding symbols to schematics with an error "Design Item ID'<comp>' not found" where <comp> is that particular components name, but futzing with the database a bunch seems to have cleared that up (I believe setting the description to the same as the symbol name, changing from "<company name> part number" to "part number" column name for the lookup, or perhaps something else I tweaked at the same time)When I go to the Libraries window, I can see all of my tables and they look like separate tables. When I select the library and component, I can see the symbol but not the footprint. I can add the part to the schematic, but can't import it to the PCB because the footprint can't be found. It seems to be looking for the correct name, but I'm not sure how to help it find the correct file.Thoughts? Does this workflow seem correct? It's slow and clumsy and at the moment, I'm not sure if it is worth all of the extra work it is turning out to be.

author: dboyer
author_rank: Contributor
timestamp: April 24, 2014, 09:09:04 pm
content: I've been playing with this on and off, and have some positive results so I figured I would add the information here in case anyone else follows the breadcrumbs to this thread.The SVNDBLib examples can be downloaded athttp://techdocs.altium.com/display/ADOH/Download+Examples+and+Reference+DesignsI ended up building an access database with one monolithic table with all of the parts, and all of the possible parameters we care about. I then used stored queries to subselect from the master list to find certain parts. For instance, I have a column that is "type" and I will put connector, resistor, regulator, etc, and then have a query that selects the fields of interest for rows that have the part type set correctly. When loaded into altium, it looks like each query is a separate library. This seems pretty good and allows for pretty granular selection to see exactly the parameters you want, on the parts you want, grouped exactly how you want.I have all of my symbols and footprints loaded and linked via the library ref and footprint ref fields. This works great for the schematic, but I have not been able to load a footprint properly when importing to the pcbI can open up the svndblib, right click on a table entry, and view both the footprint and the symbol. However, when I load the library via the library manager, the footprints are not visible. I can add parts to a schematic just fine, but cannot import them to the pcb nor place component footprints directly to the pcb.Any ideas on what may be incorrect?Dealing with passive components in the library:Here is an interesting thing I'm trying and it should work okay with a dblib too at the very least. Our workflow often has us dropping down 'generic' passives during schematic capture, and going back through the design later to select particular values. Unfortunately, this can happen after the pcb layout is underway so I don't want to literally delete and put down a new component. Currently we go through and manually modify the parameters on that particular component to have the right value so when the bom is generated, its correct. However, we'd love to have more information for each component (such as supplier information) ready to go in the database and properly linked.To facilitate this, I have a resistor category with a 'generic' resistor, and a ton of specific ones with our particular part number for resistors along with specific parameters. The gist is that a generic resistor can be placed during schematic capture and then replaced later. The generic resistor has all of the possible footprints, and the footprint can be selected so it can be placed and routed. The rest of the resistors have the package coded in the part number and are specific so they only contain the single footprint. By double clicking a component, selecting design item id -> choose, and finding the correct part, all of the parameters including footprint ref is modified to match the new part - exactly what we want!

author: dboyer
author_rank: Contributor
timestamp: July 02, 2014, 04:20:50 pm
content: Quote from: dboyer on April 24, 2014, 09:09:04 pmFYI, this was solved by changing my library folder structure in SVN from Library/sch and Library/pcb to just Library/ for both. By moving them to the root and dropping them all into the same folder, things started working. I would have rather kept them organized but whatever - I prefer the library to function even more.

author: cs42
author_rank: Newbie
timestamp: July 10, 2014, 11:50:36 am
content: What you describe here isn't a generic problem with SVNDbLib. In our svn tree we even use subdirectories like Footprints/Diodes and Symbols/Connectors. Maybe your configuration in the .SVNDBLIB is wrong. There you can set where AD is supposed to find symbols and footprints inside the svn tree.

author: adiorio
author_rank: Newbie
timestamp: March 20, 2016, 12:41:31 pm
content: Hi,It sounds like you found a workaround, but I thought I'd post how I resolved the issue...We're setting up Altium for the first time at my company and we've run into the same issue as you have with SVNdblib and the footprints not being found once trying to import schematics in PCB layout. BTW, we use separate folders for symbols and footprints.It turns out that when I was placing the parts that I had defined in schematics, the device Item ID was blank:After filling it in with the part number, the footprint could be found when importing schematics in the PCB.It turns out that the reason why this field wasn't being filled in was because of the SVNdbLib single key lookup I was using. Once I used The database field "Part Number" and matched it to our part number parameter, subsequent placement of schematics parts did populate this field correctly.Hope this helps...

author: ajb
author_rank: Super Contributor
timestamp: March 21, 2016, 11:45:03 am
content: Sounds like the OP's problem was with the paths in the dblib, which need to be complete paths relative to the database file (possibly also the dblib file, I don't remember). If you've got your footprint at "Library/PCB/0805resistor.PcbLib" and your sch at "Library/SCH/passives.SchLib", and your dblib is at "Library/YourLibrary.mdb", then the PCB and Sch files in the database entries need to be "PCB/0805resistor.PcbLib" and "SCH/passives.SchLib", respectively. I believe you can use parent folder paths ("../"), but not 100% sure.General advice for dblibs after using them for a while:- As tempting as it is to have a separate table for each component type, that's a nightmare for integrating with other applications, or even for doing things like Access forms to manage the tables. A single monolithic table is far easier to work with.- Including hierarchical classification fields (Type/subtype/subsubtype) will make it easy to filter to the specific part you want in the library browser, like Transistors->FETS->N-MOS.- As tempting as it is to put every single parameter in the database, it's really a waste of time. Something like a resistor, okay, you basically need value, tolerance, tempco, power rating, but things like transistors start to get a bit unwieldy, and you tend to have either a crapload of tables or a ton of meaningless parameters (you either have separate tables for BJTs and FETS, or all of your BJTs have a Rds(on) param...). It's far easier to put the most important parameters in a description field and include a datasheet link so that you can verify specific parameters when you select the part.-The field you use for lookup needs to be unique across the entire database, not just across the table due to a bug*. If you have a single table, this is a nonissue.-DBLibs cannot contain a field called "Table" due to a bug*.* These might be fixed by now, but I'm not inclined to muck with my dblib to check.

author: natthapol.vanasrivilai
author_rank: Newbie
timestamp: September 21, 2017, 10:16:00 pm
content: Quote from: dboyer on March 21, 2014, 04:49:41 pmEven with AD17, i had the same problem too, and i'm pretty sure i did setup all the configurations correct. It turns out that the empty spaces in SVN repository was causing the problem. I replace all the empty spaces in SVN path with "_" and the footprint start working like it should.