delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/07/19/19:16:48

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Thu, 19 Jul 2012 16:00:03 -0700
From: Colin D Bennett <colin AT gibibit DOT com>
To: geda-user AT delorie DOT com
Subject: [geda-user] pcb footprint update hack
Message-ID: <20120719160003.3a3fb538@svelte>
In-Reply-To: <201207191846.q6JIkbTb030133@envy.delorie.com>
References: <20120719182728 DOT GA12447 AT slana DOT eecs DOT oregonstate DOT edu>
<201207191846 DOT q6JIkbTb030133 AT envy DOT delorie DOT com>
X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version: 1.0
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - gator297.hostgator.com
X-AntiAbuse: Original Domain - delorie.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - gibibit.com
X-BWhitelist: no
X-Source:
X-Source-Args:
X-Source-Dir:
X-Source-Sender: (svelte) [67.160.113.82]:42006
X-Source-Auth: colin AT gibibit DOT com
X-Email-Count: 1
X-Source-Cap: c2t5bGVuO3NreWxlbjtnYXRvcjI5Ny5ob3N0Z2F0b3IuY29t
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

On Thu, 19 Jul 2012 14:46:37 -0400
DJ Delorie <dj AT delorie DOT com> wrote:

> > So, what is the proper procedure?
> 
> View->Displayed Element Name->Description
> 
> that's the "footprint name" that the importer knows about.
> 
> Change it to anything different (i.e. delete a char or append
> "x"), and it will do a footprint update, at least pcb's
> File->Import will. I thing gnetlist will replace the footprint,
> but not keep it in the same place.
> 
> You should try out pcb's File->Import if your version has it, it's
> much better at live and in-place updates that gsch2pcb.

Yes, definitely use the Import Schematics feature of pcb
(File | Import Schematics menu item or the ":Import()" command).
You can set attributes on the board to tell pcb to read multiple
schematic files, like:

Attribute("import::src0" "../Schematic/Connectors_and_Power.sch")
Attribute("import::src1" "../Schematic/Microcontroller.sch")
Attribute("import::src2" "../Schematic/Radio.sch")

and define footprint library path by putting a text file called
pcb.settings in your layout file directory, with the following
content:

lib-newlib = ../Footprints

Now for the hack which allows you to easily get a footprint updated
in pcb when you edit the footprint file in your library.

It would be great to get this integrated into pcb, but for now this
is ten times better than any other way, especially when you have
multiple instances of a footprint in your schematic.

----------------------------------------------------------------
How to get pcb to update footprints in a layout when the footprint
file in the library on disk has been updated:

Suppose you have the following set of files for your project, for
simplicity's sake:

  Board.pcb
  Schematic.sch
  XYZ123.fp

Suppose further that you have 50 instances of XYZ123 on your
schematic.  You really don't want to do this manually.

1. Rename the old footprint file to a different name:
   mv XYZ123.fp XYZ123_old.fp
   This is necessary to get pcb to re-import the footprint.

2. Replace all instances of this in your schematic with the temporary
   name:
   sed -i -e 's/footprint=XYZ123/footprint=XYZ123_old/'

3. Open the layout in pcb and update the layout from schematic.
   pcb Board.pcb
   Execute File | Import Schematics.

4. Save the layout.

5. Put the new footprint file in place under the original name
   (XYZ123.fp).  You can delete the XYZ123_old.fp file now.

6. Fix your schematic back to the proper name:
   sed -i -e 's/footprint=XYZ123_old/footprint=XYZ123/'
   (or, you could "bzr revert Schematic.sch" if you have it version
   controlled and have no other changes -- much faster if you are
   updating multiple different footprint files)

7. Open the layout in pcb and update the layout from schematic.
   pcb Board.pcb
   Execute File | Import Schematics.

8. You might have to fix some components, they sometimes are
   rotated incorrectly after being updated.  Use the rotate tool
   and click on the component reference point (diamond) until
   things are lined up.

9. Save the layout.

10. Sit back and relax. Think about how nice it would be if it
    were automated and seamless.  :-)


Regards,
Colin

- Raw text -


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