delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/07/19/21:33:56

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
Date: Thu, 19 Jul 2012 21:33:25 -0400
Message-Id: <201207200133.q6K1XP90019375@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: geda-user AT delorie DOT com
In-reply-to: <50089DC4.7020006@ecosensory.com> (message from John Griessen on
Thu, 19 Jul 2012 18:52:36 -0500)
Subject: Re: [geda-user] pcb footprint update hack
References: <20120719182728 DOT GA12447 AT slana DOT eecs DOT oregonstate DOT edu> <201207191846 DOT q6JIkbTb030133 AT envy DOT delorie DOT com> <20120719160003 DOT 3a3fb538 AT svelte> <201207192322 DOT q6JNMhYj012483 AT envy DOT delorie DOT com> <50089DC4 DOT 7020006 AT ecosensory DOT com>
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

> So, would this be the procedure?
> 
> 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. search and replace with sed or ? on the file Board.pcb to replace
> XYZ123.fp with XYZ123_new.fp

Using a plugin that either does a regex search, or better, just
operates on "all selected alements".

I suggest changing XYZ123.fp in the pcb to XYZ2123.fp-update-me or
something obviously not a filename.  The new name is not a file name,
it's just a string that doesn't match the schematics.

> 2. Replace all instances of this in your schematic with the temporary

No.

> 2a.  create file XYZ123_new.fp

No.  My procedure assumes you have modified the existing XYZ123.fp,
and you just want want to import the updated footprint.  You don't
need to change the name of the footprint in the library, you only need
to make PCB and the library have different names.  You can do that by
changing the library OR changing the pcb.  Changing the PCB is better.

As long as the schematic and pcb have different names (it just calls
strcmp), the footprint is updated.  There are two scenarios:

1. You've selected an alternate footprint.  Change your schematics and
   import, the old footprint choice is in the pcb so the names don't
   match.

2. You've edited a *.fp in your library and you want to update your
   pcb.  Change the name in the *.pcb and import; the schematics still
   have the right (original) name but pcb *thinks* the schematics have
   a "new" name, because the names don't match.

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

Yes.

> 4. 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.

Yes.

- Raw text -


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