5
\$\begingroup\$

I want to combine two Altium schematic libraries into one, eliminating any duplicates as defined by the symbol reference.

There is a command to remove duplicates in a library as so:

enter image description here

Unfortunately, if I copy/paste the contents of one library into another in the SCH Library dialog, duplicates are re-named with a trailing '_1' etc. so they are no longer duplicates.

enter image description here

There is a library splitter command, and a remove duplicates command so I assume there's some way to put back what can be split asunder but I have not been able to find it so far. Any suggestions would be appreciated.

\$\endgroup\$
  • 2
    \$\begingroup\$ Can't you filter the list for the names ending with _1 and just delete all of them? (just a guess, I don't have altium here..) \$\endgroup\$ – Eugene Sh. Nov 10 '16 at 18:57
  • \$\begingroup\$ @EugeneSh. That's my backup plan- I can filter the source libraries first in case there are some already there, but I was hoping for a more elegant solution. \$\endgroup\$ – Spehro Pefhany Nov 10 '16 at 19:14
  • 1
    \$\begingroup\$ Altium, elegant? \$\endgroup\$ – The Photon Nov 10 '16 at 19:19
  • \$\begingroup\$ @ThePhoton It's relative I guess. ;-) There's usually more than one way of doing things, seldom all that intuitive. \$\endgroup\$ – Spehro Pefhany Nov 10 '16 at 19:23
  • 1
    \$\begingroup\$ I think there isn't a elegant way to do this. The only way I can think of is filtering the _1 components. \$\endgroup\$ – Jesus Castane Nov 11 '16 at 10:13
2
\$\begingroup\$

I'd recommend using Altium's excellent scripting capabilities, there are plenty of examples here (and other places), including one for 'Delete Selected Library Items'. I would take one of these scripts and modify it for your purposes.

Or write your own script to de-duplicate the libraries in-place without copying (I know I've written one of these myself in years past, but I've no idea where it is right now - I'll see if I can find it)

The basic script is simple (pseudo code):

Open lib
Loop through components in lib
  If it's name ends in '_1' and various fields are the same then
    delete it
  end if
end loop
close lib

Link: Collection of Altium Scripts

\$\endgroup\$
0
\$\begingroup\$

Unfortunately, no "merge" command, as far as I can see. Merging appears to be something reserved for SVN Collections.

Best bet is to make a new library with no component footprints (do these first as it's easier to make multiple copies in the SchLib file and bind different footprints to each).

Then, with this new master PcbLib open, open a few of the additional component PcbLib files and copy followed by "Paste Component" into the new library. Once each batch of new footprints have been copy/pasted, move the copied PcbLib files to a different folder.

After a while, you'll have one PcbLib master and one SchLib master.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.