X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-No-IP: dbtgroup DOT com AT noip-smtp X-Report-Spam-To: abuse AT no-ip DOT com Message-ID: <5553C6F7.2000707@dbtgroup.com> Date: Wed, 13 May 2015 14:49:43 -0700 From: "Yvette S. Hirth, CCP, CDP (yvette AT dbtgroup DOT com)" Organization: The DBT Group, Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: geda-user AT delorie DOT 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> <201505131734 DOT t4DHYXa7031201 AT envy DOT delorie DOT com> In-Reply-To: <201505131734.t4DHYXa7031201@envy.delorie.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Reply-To: geda-user AT delorie DOT com On 05/13/2015 10:34 AM, DJ Delorie wrote: > 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; thank You! yvette