Author Topic: [solved] Select multiple components by searching with a list of designator  (Read 3259 times)

0 Members and 1 Guest are viewing this topic.

Offline AucieleTopic starter

  • Contributor
  • Posts: 13
  • Country: fr
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 matched

i 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
« Last Edit: March 30, 2017, 12:07:01 pm by Auciele »
Electronic engineer - Altium 10.1377.27009
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2582
  • Country: us
Re: Select multiple components by searching with a list of designator
« Reply #1 on: December 02, 2016, 04:08:26 pm »
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.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21609
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Select multiple components by searching with a list of designator
« Reply #2 on: December 02, 2016, 05:36:47 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline AucieleTopic starter

  • Contributor
  • Posts: 13
  • Country: fr
Re: Select multiple components by searching with a list of designator
« Reply #3 on: March 30, 2017, 10:26:14 am »
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 |O, 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 data
orange columns: various sub-step data
green columns: outputed data


thank you again for all your previous answers, they helped me.
Electronic engineer - Altium 10.1377.27009
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf