Altium library management dilemma - Page 1
Forum section: electronics / projects

author: swglabs
author_rank: Newbie
timestamp: August 06, 2018, 02:29:20 am
content: Sup EEVgang, first post here! I made this account hoping somebody more experienced than myself would be able to resolve a specific library management issue I'm having in Altium:I understand that many PCB designers have a parameter for every part in their library which describes the status of that part, which is set to something like: blank when the part is created, "checked" when the symbol+footprint is verified, and "approved" when a board with that part works. That way, when I'm checking out a design, I know which parts are already good.That's all nice and straightforward, but here's my problem: when I'm done testing the board, and I want to update the status parameters of all the parts I used, I have to manually go through each of my libraries and update the parameters one by one!(or, alternatively, if I'm using a library local to the project, when I'm done with the board, I have to manually copy each part into the appropriate library)Is there any neat solution to update a library from a part in a project? I've googled around, but all I ever find is the inverse -- how to update parts from their libraries.Thanks in advance for the help[insert back to the future reference here]

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 06, 2018, 09:01:58 am
content: Unfortunately that's one area they're lacking. You can mass-select objects in libraries (using the filter panel, filtering "all components in current library" or whatever it's called), but you can't mass-edit the parts themselves (whereas, for example, you can in SCH view).Tim

author: Philfreeze
author_rank: Regular Contributor
timestamp: August 06, 2018, 11:34:56 am
content: Are you using a database library (DbLib) or SVN-Library (which is essentially also a DbLib)?If yes you could either write a short script in the langugage of your choice where you can enter the names/ item number of the components and it edites the DB accordingly.If not you could still write an Altium script that goes through each component in the library and edits the correct parameter.I have attached a script that goes through each component in a PcbLib and returns the width of every line within it. You could probably modifiy it to do what you want to do in a day.

author: swglabs
author_rank: Newbie
timestamp: August 08, 2018, 04:53:45 am
content: Thanks a lot, guys, I appreciate the input. I'll take a stab at writing a script for it.

author: Bassman59
author_rank: Super Contributor
timestamp: August 08, 2018, 09:21:27 pm
content: Quote from: swglabs on August 06, 2018, 02:29:20 amThe way we do it is we have a company-standard library, and a part doesn't go into the library until it is released.That is: someone requests a company part number, which is then created. Purchasing verifies it can be bought (which is real tricky for certain parts these days). Someone, usually our layout guy, creates the Altium component (symbol, footprint, 3D model, with our part number as a field in the symbol), and then someone else checks the symbol, footprint, etc for correctness. Once all that's done, the part is released and compiled into the company integrated library.The rule is basically if a part is not in the library, it shouldn't be used. Getting a part into the library isn't as onerous as the paragraph above makes it seem.

author: swglabs
author_rank: Newbie
timestamp: August 17, 2018, 04:13:48 am
content: Ok, I'm back with my tail between my legs.I thought writing the script would be fairly straightforward, given plenty of programming experience, but I soon found out that Altium's limited support for lots of standard Delphiscript features (combined with the fact that nobody uses the goddamn language) led to lots of frustration. If I can resolve any one of the issues I ran into, I'll be able to get the script to work:I was unable to iterate through files in a directory. Every website I found referenced the FindFirst function, but this didn't work (FindFirst returned 0, indicating success, but the files in the dir weren't accessed)Calling an external .exe to do the iterating also didn't work -- the ShellExecute function wasn't recognized by altium, even when the appropriate libraries were added ("uses ShellApi")If there's some other way to find a source SchLib file from a part in a project, I couldn't find itAny other ideas, workarounds, kludges, etc etc are welcome!