[solved] Select multiple components by searching with a list of designator - Page 1
Forum section: electronics / general

author: Auciele
author_rank: Contributor
timestamp: December 02, 2016, 02:25:08 pm
content: Hello,In my altium project my components lost their ref parameter, well not exactly but the facts are:- none of the components have a manufacturer ref- i only have this ref in a BOM- the designator between schematic and BOM still matchedi want to add the ref from the BOM to the hundreds of components in my project. I couldn't find an easiest way to do that than to look for each designator in the BOM and then copy-paste the ref through the parameter manager.But it will be very time consuming, so i was wondering if it is possible to use a filter or the "find similar" tool to select multiple components accross all the project sheets using only the designator list from the BOM on excel which would be formated like that:"R1, R2, R5, R140" for example.filter would be like that:(ObjectKind = 'Part') And ((PartDesignator = 'K1') Or (PartDesignator = 'K2')).Now the bonus question would be: is it possible to have some scripting that use the list and a ref (string) as input and that will add (or edit) the "Manufacturer Part Number 1" parameter to all the listed components?i'm totally not into scripting as you might have guested, since i'm not into programming too (sadly)thanks for your advice

author: ajb
author_rank: Super Contributor
timestamp: December 02, 2016, 04:08:26 pm
content: You could definitely do what you want through a user script. User scripts are extremely powerful, but from the limited amount of scripting I've done in Altium the scripting API is very poorly documented and assumes familiarity with one of the available scripting languages. At the very least it's going to be a big time sink if you come in with no programming experience.One option for fixing this in the immediate project would be to use formulas in Excel to construct a filter query for each line in the BOM catalog. Then you can copy and paste the generated filter into the Sch Filter, and then paste the required parameter into the filtered parts in the Sch Inspector.Depending on what sort of library setup you have, it may be easier to add the parameter(s) you need into the parts in the library, then update parameters in the project from the lib. That will solve the problem in the future, since the parts in your lib will now have that parameter by default, but if you've edited component parameters in the project you risk clobbering those when you do the update.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 02, 2016, 05:36:47 pm
content: Go to Parameter Manager (T, R).Sort by designator.Select the designator column and copy (CTRL+C). Paste this into your BOM on an unused column. Use this to cross-reference your BOM columns. (Use Excel functions to match and index them, or add an index column (numbers incrementing) and use column sorting to match things up, or...)The sorting is necessary because Altium and Excel use different sorting methods. Simply sorting by designator won't match up. Also, if your BOM has multiple designators per row, you need to search for a match in each cell, which is different.Copy the MfgPN (or whatever data it was you're looking for) column, now that it's sorted in Altium order. Paste it into the Parameter Manager in the relevant column.You could also use a Database Link to the spreadsheet, if its data is separated appropriately.Tim

author: Auciele
author_rank: Contributor
timestamp: March 30, 2017, 10:26:14 am
content: Hello again, i missed the opportunity to give a feedback on this.I used excel capabilities to sort out a list of the designator and on the next column their manufacturer ref.I then extracted the list of designator from the parameters manager to excel where i matched the Manufacturer ref to the designator in the same order. copying back to altium the manufacturer part ref list into the parameter manager (and then ECO of course).In case anyone fall into the same kind of trouble somedays, please find attached an "example" of my sorting algorythm for excel. I did it in the extend of my knowledge and thus it might not be optimized (if you use it and something goes wrong, i won't be responsible).red columns: my input dataorange columns: various sub-step datagreen columns: outputed datathank you again for all your previous answers, they helped me.