X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com Date: Wed, 12 Jul 2017 16:48:13 +0200 (CEST) X-X-Sender: igor2 AT igor2priv To: "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com]" X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu" From: gedau AT igor2 DOT repo DOT hu Subject: Re: [geda-user] PCB, load element bug (know then but not why) In-Reply-To: <20170711110940.84467c71877716992ddc3b11@gmail.com> Message-ID: References: <20170711005040 DOT d96eccaffe490027849789c3 AT gmail DOT com> <20170711020955 DOT 0108aaea AT akka> <20170711110940 DOT 84467c71877716992ddc3b11 AT gmail DOT com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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 Precedence: bulk Hello Nicklas, On Tue, 11 Jul 2017, Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com] wrote: > On Tue, 11 Jul 2017 05:16:15 +0200 (CEST) > gedau AT igor2 DOT repo DOT hu wrote: > >> >> >> On Tue, 11 Jul 2017, Kai-Martin Knaak wrote: >> >>> "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via >>> geda-user AT delorie DOT com]" schrieb am 11. July 2017: >>> >>>> >>>> I discovered then adding a via at the first line I could use load >>>> element to buffer. It seems a little bit and the problem is the same >>>> in both pcb and pcb-rnd. Anybode have a clue? >>> >> >> >>> Can you give the contents of the footprint.fp file? Maybe the *.pcb file >>> you derived the footprint from, too? >> >> I second this. Please share the offending (failing) .fp file and the >> one you manually fixed. >> >> Regards, >> >> Igor2 > > Attached. I used save buffer elemnts to file. Neither load layout or element to buffer worked. Adding a via at the first line and it could be loaded with load element to buffer but not load layout to buffer. > > I happened to have an old file that worked and then checking content of this in editor I found vias in the beginning of file and was very suprised then file could be loaded then one of these where added at the first line. > > I am pretty sure I used it before without problems before but can't remember the details. Could it be wrong parser is selected somewhere? File ending *.pcb Thank you. The problem is unfortunatley more complex. The .fp format is a single Element[] or Element() block in a file. The .pcb format is a set of different objects, possibly Elements too, and some headers (like PCB[]). A .pcb file will contain layer infromation too, an .fp file won't. The file you attached is neither of the above: - it contains two elements, so that it can't be a footprint file - it also contains (some) layer info, so it can't be a footprint file - but it does not contain the necessary headers to make it a valid .pcb file It is a known bug in pcb-rnd, probably also in mainline: if you save a buffer with more than 1 elements, it will be hard or impossible to load it again. Saving only 1 element as buffer and you will be able to load it. I don't plan to fix this in pcb-rnd, as elements will be removed soon. I will make saving the buffer as buffer and saving a single subcircuit as a footprint more explicit on the UI. Regards, Igor2