Mail Archives: geda-user/2013/01/28/22:55:22
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 -