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

Re: gEDA-user: database driven component chooser - part II



Hi Duncan,

The format you mention in your example is the representation of a
schematic if it lives on a (physical) disk (or other device), it should
comply with the rules stated in the gschem fileformat (see the wiki
pages).

OTOH, this is most certainly not the representation/structure in which
the schematic lives in the memory of your PC/workstation.

If you would want to add attributes during gschem run-time (a.k.a. on
the fly) you would have to find your way in a maze of
pointers/structures/objects (see the link in the previous post).

There are some helper functions already in place (as Peter B) mentions,
and some functions still need to be written to accomplish the loading of
attributes from Levente's dbsym.

If you were to write a stand-alone application to add the attributes
inside the file on disk, you would have to load ( or revert) the
schematic in gschem (some users find this cumbersome).

Imagine you would have to reload a (word) document every time you want
to underline a phrase, or apply a different font.

Just my EUR 0.02  ;-)

Kind regards,

Bert Timmerman.

On Wed, 2007-10-03 at 23:24 +0200, Duncan Drennan wrote:
> > AFAICT, it's a bit more complicated, the .sch is the result of the
> > writing of gschem objects/structures to a file (in a defined syntax).
> >
> > Have a look at: http://www.brorson.com/gEDA/gEDA_Structures_20050108.pdf
> 
> Hmmm, I don't understand that document at all.
> 
> My comment was based on the info about the file format on the wiki,
> http://geda.seul.org/wiki/geda:file_format_spec?s=sch%20format.
> 
> An example of a symbol on a schematic is,
> 
> C 63400 53800 1 0 0 diode-1.sym
> {
> T 63700 54300 5 10 1 1 0 0 1
> refdes=D1
> T 63400 53800 5 10 0 1 0 0 1
> model-name=DIODEM1_Q1
> T 62500 53600 5 10 1 1 0 0 1
> file=model/DiodeM1_Q1.mod
> T 63800 54400 5 10 0 0 0 0 1
> device=DIODE
> }
> 
> T defines an attribute (attributes are in braces after the item they
> are attached to), and next two numbers are XY coordinates. Not too
> sure what the rest are exactly, as they are not defined in the wiki,
> but I would hazard a guess they indicate whether it is visible
> (name/value/etc).
> 
> 
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user



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