[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: PCB: Lost custom element data when file is reopened ? Bug ?



On Tue, 2007-08-28 at 10:55 -0600, armdeveloper wrote:
> On Tue, 2007-08-28 at 10:39 -0600, armdeveloper wrote:
> > I spent the morning making 4 new elements.  PCB worked great.  I saved
> > my work every 5 minutes.
> > 
> > I closed PCB.  I regenerated the netlist from the schematic due to a
> > change.  I used gsch2pcb myfile.sch to regenerate the netlist.  
> > 
> > I opened myfile.pcb with PCB.  My custom elements are missing.  Where
> > did they go ?  This actually happened to me yesterday as well.
> 
> myfile.pcb.bak0 has the custom elements in it.  Why did this happen ?

myfile.pcb.bak0 has the custom elements in it because gsch2pcb saves a
backup before modifying your design ;)


I've had it happen to me to, occasionally for no apparent reason - that
gsch2pcb doesn't think the footprint on your PCB matches the one it
should be.

In your case, its probably because gsch2pcb didn't insert those
elements. You should save each element to a .fp file and set the
footprint=... attribute in your schematic to match the filename (no .fp
needed).

Put the .fp files in a subdir, "packages" from your working directory.
Alternatively, pass -d PATH on the gsch2pcb command line, then gsch2pcb
will be able to find and insert them for you. You may like to play with
changes such as the following in your .pcb file to avoid having gsch2pcb
delete your existing footprints and replace them:

As a test, I just tried it on one of my designs. If you break a
footprint to pieces, make it an element again, give it the right refdes,
gsch2pcb will replace it.

This is the difference after breaking it up and replacing:

After breaking up / re-pasting:
Element["" "" "CONN4" "" 60000 120000 0 0 0 100 ""]

What gsch2pcb inserts:
Element(0x00 "25m" "CONN4" "unknown" 1000 2566 1 150 0x00)

NB: By changing the above line in the .pcb file after re-pasting,
(ignoring the coordinates, thats not the point), gsch2pcb no-longer
replaces my footprint. This is probably because its trying to match the
"footprint=25m" in my schematic.

Try setting the "right" footprint name in the argument list before the
refdes, and see if that makes gsch2pcb happy.

Regards,

Peter C.




_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user