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

gEDA: Saving out pin attributes from gattrib



Hi Ales and gEDA gurus --

Another question about objects and the libgeda data structures.

I have gotten gattrib to read, display, and edit  pin attribs
now.  This feature will be useful to people who use PCB, and want to
make sure that their pinseq attribs are set correctly for
compatability with their footprints.  

Unfortunately, there is a problem: when gattrib tries to save changed
pin attribs out, it is unable to do it.    

The problem is architectural.  Pin attribs like pinseq and pinlabel
are attached to the sym file, not to the sch file.  This means that
when I call s_page_save_all, no pin changes get saved out because they
don't live in the sch file.

There are two ways to fix this:

1.  I can alter gattrib so that it also writes out changes to the sym
    files.  This strikes me as dangerous, because you might screw up your
    entire symbol library by just changing pinseq attribs willy-nilly.
    Therefore, I am against it.

2.  We can implement some kind of "shadow attribs" for pins.  This
    means that basic pin attribs exist at sym level for the components, but
    you can overwrite them at sch level, and the overwritten attribs get
    written out in the netlist.  Refdes already works like this,
    why not make pinseq and pinlabel work the same way?

    To make shadow attribs work, however, we need to make pins editable in
    the schematic.  Right now, they are only editable in the symbol
    editor.  This is a gschem change.  I could look into doing it, but
    you are the gschem owner, and I would want to ask for your permission
    and guidance.

Finally, there is a work-around, which might become a permanent fix if
users think it is acceptable.  Users might only want to *view* their
pin attribs using gattrib, but fix them directly in their symbols
using gschem's symbol editor.  This might be acceptable because almost
all of the time you want to make sure that your pins have the correct
pinseq attrib for PCB; you don't really care to change them.

If this is the case, I can just make the "pin" panel in gattrib
non-editable.    I am interested in hearing from other gEDA hackers
what they think about this solution.  Please let me know!

Stuart