X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f Date: Wed, 13 May 2015 13:34:33 -0400 Message-Id: <201505131734.t4DHYXa7031201@envy.delorie.com> From: DJ Delorie To: geda-user AT delorie DOT com In-reply-to: <55537E57.8050200@dbtgroup.com> (geda-user@delorie.com) Subject: Re: [geda-user] Using gerbv for assisting manual placement tasks References: <1431386490 DOT 2980 DOT 28 DOT camel AT cam DOT ac DOT uk> <201505130159 DOT t4D1xkkd031338 AT envy DOT delorie DOT com> <55537E57 DOT 8050200 AT dbtgroup DOT com> Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > > I use a script that greps the BOM and highlights all matches in PCB... > > would you mind sharing this with us? i'd like to see it. The way it works is I type "go 587-1299-1" or something on the command line (which also tells me how many to place), then hit 'g' in the PCB window (which highlights them). My pcb-menu.res has this somewhere: {"grep" a={"G" "g"} ExecuteFile(/tmp/pcb.grep)} And I use this script in the working directory (my "go" runs it, call it what you want): #!/usr/bin/perl # -*- perl -*- $reg = shift; open(B, "board.bom"); $first = 1; open(G, ">/tmp/pcb.grep"); print G "Unselect(All)\n"; while () { chomp; ($refdes, $value, $footprint, $device, $voltage, $manufacturer, $manufacturer_part_number, $vendor, $vendor_part_number, $qty) = split(':', $_); if ($first || /$reg/i) { print "\033[34m" if $first; printf("%-7s %-24s %-18s %s\n", $value, $manufacturer_part_number, $vendor_part_number, $refdes); print "\033[0m" if $first; if (!$first) { for $r (split(',', $refdes)) { print G "Select(ElementByName,$r)\n"; $count ++; } } $first = 0; } } print "\n\033[32m$count parts\033[0m\n"; close G;