delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/05/13/17:50:00

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)" <geda-user AT delorie 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> <CAC4O8c9p2qhrc+1J53C7Apu=h+Jd2b_v+tdF7m70-ABng=GLfQ AT mail DOT gmail DOT com> <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>
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" "<Key>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 (<B>) {
>      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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019