On Thursday 26 September 2002 06:37 pm, Stefan Petersen wrote: > Anyhow as I see it Ales is basically right. If you have components named > C1, C2 and C3 and then restarts gschem the next C-component added should > be namned 1, ie C1.
I feel like I'm going insane, because when I retested the auto-uref stuff, it worked as you described it. We'll chalk that up to user error (sorry about that one). > Is this script still in use? I thought it was retired and replaced by > some perl/awk/shell script thingie? dunno about that... I've been using a vi search/replace command to remove numbers in preparation for executing the autonumber menu option, and I suppose that could be easily turned into a sed command. > It seems like you use this script in "batch mode" or I'm really lost. > It's intention is to be used interactivly. I haven't followed this > discussion too close. I thought noone used it anymore. to clarify: I was using auto-uref.scm by adding the following lines in ~/.gEDA/gschemrc : (load (string-append gedarcdir "/scheme/auto-uref.scm")) (add-hook! add-component-hook auto-uref) (add-hook! copy-component-hook auto-uref) Not "batch mode", as the script was triggered only when I added (or copied) components. I hope the "source=subsheet.sch" part in my original post didn't mislead you-- all I was saying there was indicating the fact that one symbol has a source= attribute, which leads to a subsheet with reference designators that are effectively ignored (although the gschem log indicates that the subsheet is being read during renumbering operations). then, I tried the autonumbering menu option (not related to the auto-uref.scm code itself, just a similar thing from a (somewhat confused) user's perspective). The other autonumbering problem still exists. To isolate any oddness caused by the heirarchical design, I narrowed the problem down to this testcase: I opened up a new schematic, placed a whole bunch of resistors (with auto-uref disabled, this time), and saved it. All of them had 'refdes=R?'. I then executed the autonumber command (menu: "Attributes" -> "Autonumber text...", then entered "refdes=R" in the box), and saved it. Everything works as expected to this point. I then close down gschmem. Next, I reopen the schematic, place a few resistors, and choose the autonumber menu option again. One resistor will have a duplicated refdes attribute (e.g. if R1, R2, R3 and R4 are already numbered, then the renumbering process will create a refdes=R4 attribute on the first unnumbered resistor (and the rest will have increasing numbers as expected). I've done this test several times with different numbers of resistors labeled and unlabeled, and I can send test cases if you want. The rationale behind doing things this way is as follows: I would like to autonumber reference designators, but I frequently quit and restart gschem later (hence, auto-uref is not as helpful since it starts over at 1). When I execute the autonumber menu command, I don't want to have to remove the existing reference designators from components already placed in the schematic. (This accounts for the mix of unnumbered and numbered components). thanks for your patience on this one... -- Charles Lepple <[EMAIL PROTECTED]> http://www.ghz.cc/charles/
