[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-user: ref des renumbering in gschem?



Hi Dan,

>is there a way to have the refernce designators (uref) get renumbered?  I
>copied and pasted several components in a schematic and now they have the
>same uref.


	Hmmm.. not that I can recall from within gschem, however, here
is a script written by Rolf Fiedler which unannotates all components.

-- Cut here --
#!/bin/sh

if [ -z $1 ]; then
        echo "No sch file indicated"
        echo "usage:"
        echo "annotate file"
        echo "  file is generated by gschem"
        exit 1
fi 

cat $1 | sed "/uref=\([A-Za-z][A-Za-z]*\)[0-9][0-9]*/s//uref=\1?/g" > $1.tmp
mv $1.tmp $1
-- Cut here --

After running this script, Execute Attributes/Autonumber Text... (or
it might be under Edit if you are using an older version of gEDA/gaf).
Autonumber Text... is courtesy of Dave Lawrence. 

Also there is Stefan's auto ref "while-you-work" method (look in
system-gschemrc and search for hook and uncomment those lines). 
And then when you place and copy components they will be automatically
numbered.


>I tried executing the auto-uref.scm script but nothing seemed to happen.

	auto-uref.scm?  Oh yeah, that's part of Stefan's auto-uref code.
That is not meant to be executed directly. 

								-Ales