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

Re: gEDA-user: Bug or feature?



Hi Guys --

> >Another suggestion:
> >
> >Would it be possible to define (preferences) a default directory for
> >models and subcircuits? That way it would not be necessary to define the
> >entire path in each of the components. To remain compatible, I'd suggest
> >that 'file' attributes starting with / be absolute, else use the default
> >directory.
> 
> 	I'll let Stuart answer this as he is more familiar with models
> and subcircuits.

Personally, I like Peter Kaiser's suggestion (elsewhere in this
thread) to use an environment variable to set the default SPICE model
directory. I suggest the following:  $SPICE_MODEL_DIR.  Then,
spice-sdb would look in the environment to see if this variable is
set.  If so, it uses it.  If not, it reverts to ${HOME}.  If that
fails (i.e. the specified files aren't found), spice-sdb can exit(-1)
and spew an error message telling the user to set $SPICE_MODEL_DIR and
try again. 

I can also set another command line flag --spice-model-dir which acts
like setting the default SPICE model directory through the environment
variable $SPICE_MODEL_DIR.  Then you would invoke spice-sdb like this:

gnetlist -v -g spice-sdb --spice-model-dir /home/BillGates/spice-models circuit.sch

Any comments, suggestions, or objections?

Stuart