delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/01/28/22:55:22

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <51074805.8000407@innocent.com>
Date: Mon, 28 Jan 2013 22:54:45 -0500
From: Gus Fantanas <fantanas AT innocent DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2
MIME-Version: 1.0
To: geda-user AT delorie DOT com
Subject: [geda-user] Importing Schematics From Inside PCB: Lessons Learned (WAS: Re:
[geda-user] Still Struggling with PCB's Import Feature )
References: <51036C6D DOT 8050808 AT innocent DOT com> <201301261928 DOT r0QJSg6W032060 AT envy DOT delorie DOT com> <5106260C DOT 4000508 AT innocent DOT com> <201301281846 DOT r0SIkeI4016232 AT envy DOT delorie DOT com> <51072809 DOT 5030306 AT innocent DOT com>
In-Reply-To: <51072809.5030306@innocent.com>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
s=q20121106; t=1359431685;
bh=z1nTLVri+PBZdYdeblM0wauvmuM2VfUOXtNJE732+BE=;
h=Received:Received:Message-ID:Date:From:Reply-To:MIME-Version:To:
Subject:Content-Type;
b=L2F6mA1jQk+RytSJub9gNUkVKRVy4DwrGdZxcNEO2BIBf3rn2o6c7g5PQI1W6BTn/
uBLEsl2+Q0djwya+l2tOvVH1/VU2G0rPz/e+F0Nis8BaHV5Zg1uYlrrhRS2GgSUkrs
UPV1CNaoNIVsw62qzI6STUJ6IEMwCAnat7r53UswBTOsa+HH1pc3EkrU+V0TZF/Mp7
RyAFoKzKD6JisTF5SWXUo6Es/RvjacfHH1YcxC/z/2JEETENhP9SThzlZHzG3Q7A2r
qsXpgsxnNQh3ANCyXCG62ouOOs5+re/yLantlqK6pwv5R3B8dZ+3qB8jTc5+ADcPg3
ebcTM5Oaz0ekQ==
Reply-To: geda-user AT delorie DOT com

UPDATE:  After opening an empty (new) pcb invoking pcb from the command
line from the directory containing the schematic files to be imported, I
tried, in the command window, 
'Import(gnetlist,gschemfile1,gschemfile2)', not even specifying absolute
paths, and it worked flawlessly!  I purposely deleted a component to
simulate a change in gschem; repeating the above step re-imported the
component in question.  I think the little detail that threw me into a
loop was that pcb likes to see local footprint libraries declared with
File-->Preferences-->Library, which it remembers subsequently (provided,
I guess, it is called from the same directory if relative paths are used
in the library declarations).  My pcb does not seem to care for file
'$HOME/.pcb/settings', with $HOME pointing to my '~' directory. 

I retained what follows because it may be useful knowledge to somebody
else as it describes details of a pcb file, allowing tinkering with it
by hand with and editor.  'Import[GUI]()' seems to work when ONLY ONE
gschem page is to be imported (it pops a window of file selections); it
seems to me that if you want to import more than one pages, you have to
declare them explicitly as described above.

Special thanks to DJ Delorie for his patience.




Hello all,

I finally managed to get pcb to import a two-page schematic.  For the
benefit of everybody, here is what I did.  My gEDA (and pcb) version is
what comes with Ubuntu 12.10, 64 bit.

1.  Decide on a a pcb file name.  Example:  'junk.pcb'.
2. Open the as yet empty file 'junk.pcb' with pcb.
3. With File-->Preferences-->Library declare any local footprint
libraries; I used absolute paths
4. Close the file 'junk.pcb' (or whatever your file name is)
5. Open 'junk.pcb' with an editor (I used vim)
6. Find the last line of the last symbol declaration (closing
parenthesis; in my case it is for symbol '~')
7. Declare each gschem file to be imported with '
Attribute("import::source[[:digit:]]*"  "path/to/file") ' one per line
8. Save and close the file
9. Reopen 'junk.pcb' with pcb; pick File-->Import Schematics and you
should be ready to go
10. If you change anything in your schematic, repeat step 9 above; you
don't have to shut down pcb

I used absolute paths in step 7 above.  Step 10 is valid assuming, of
course, that the changes in gschem do not introduce any libraries pcb is
not aware of.  It seems that pcb wants to see the declarations in step 7
exactly where it is described in step 6 (I found out the hard way!). 
Here is what I have in my 'junk.pcb' (copied and pasted from vim, with
line numbering turned on):

-----------------------SNIP------------------------------------------------


781 Symbol['~'
1200]                                                               
 782
(                                                                              

 783     SymbolLine[0 3500 500 3000
800]                                            
 784     SymbolLine[500 3000 1000 3000
800]                                         
 785     SymbolLine[1000 3000 1500 3500
800]                                        
 786     SymbolLine[1500 3500 2000 3500
800]                                        
 787     SymbolLine[2000 3500 2500 3000
800]                                        
 788
)                                                                              

 789 Attribute("import::src0"
"/home/cf/development/gedastuff/gaf/frontend/RX.sch")
 790 Attribute("import::src1"
"/home/cf/development/gedastuff/gaf/frontend/RX-p2.sch")
 791 Attribute("PCB::grid::unit" "mil")

----------------------------END
SNIP--------------------------------------------------------------------


I inserted lines 789 and 790 by hand.  Observe the closing parenthesis
in line 788.  Line 791 was added by pcb later.

I found this procedure necessary because pcb bungled up lines 789 and
790; when I tried to import from inside pcb, I ended up with only one
line which was a mixture of lines 789 and 790 now:

789 Attribute("import::src0"
"/home/cf/development/gedastuff/gaf/frontend/RX-p2.sch")

I am not sure why that happened.



- Raw text -


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