delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2024/04/30/10:32:19

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha1; d=ptd.net; s=mail; c=relaxed/simple;
q=dns/txt; i=@ptd.net; t=1714487445;
h=From:Subject:Date:To:MIME-Version:Content-Type;
bh=hnNbHxlqds6ioFxyfTQd8lpo26w=;
b=BOqlbp9IM57xN/AoxbGEwiifQfqYZYn5U7B7GtE0J6S3txfSWNg6gJq/G7K8bEfz
pT+ePb2lQclyr9QPr09N/847gLqrZtPBbjYs8QNJ/Gt4PCyMNpepRVfwcnX5hoDf
RvMTGgcDt3tkPAFoflM1iSQuJKb3Ehtx3iyPBcZO+EWH1ToMfJ7FoTDHeag2UF0n
BYpqGLTwjWotcvYL3MxAIfe3NprgV+Nz3OKzl89/YLU7Af9nE8aUN7UVzoFarzw5
PX+5E+QF4VO3xxvUcoBXmXDIjZIc0pCE1EIrMJlIZOtXGjxVt5wOaddKTr07vqQi
nQXIHuAJV9bCQITtsF6YWQ==;
X-Authed-Username: bWVuYXNpYW5AcHRkLm5ldA==
Authentication-Results: smtp02.ptd.email-ash1.sync.lan smtp.user=<hidden>; auth=pass (LOGIN)
Date: Tue, 30 Apr 2024 10:30:43 -0400
From: "Stephen C. Menasian (menasian AT ptd DOT net) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Gschem refdes autonumber over multiple pages?
Message-ID: <20240430103043.32de22ff@queeg.menasians.com>
In-Reply-To: <a49f9288-9af4-4bd7-b8bb-f1f6c41fd01f@linetec.nl>
References: <37de350c-1e5f-422f-b13a-c5a9a1e132ac AT linetec DOT nl>
<20240429130455 DOT F01EF81AB8C5 AT turkos DOT aspodata DOT se>
<a49f9288-9af4-4bd7-b8bb-f1f6c41fd01f AT linetec DOT nl>
X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-redhat-linux-gnu)
MIME-Version: 1.0
X-Vade-Verdict: clean
X-Vade-Analysis-1: gggruggvucftvghtrhhoucdtuddrgedvledrvddufedgjeeiucetufdoteggodetrfdotffvucfrrhho
X-Vade-Analysis-2: fhhilhgvmecuufgjpfetvefqtfdprffvffdpgffpggdqrffvffdpqfgfvfenuceurghilhhouhhtmecu
X-Vade-Analysis-3: fedtudenucenucfjughrpeffhffvuffkjghfofggtgfgsehtqhertdertdejnecuhfhrohhmpedfufht
X-Vade-Analysis-4: vghphhgvnhcuvedrucfovghnrghsihgrnhdfuceomhgvnhgrshhirghnsehpthgurdhnvghtqeenucgg
X-Vade-Analysis-5: tffrrghtthgvrhhnpeegveefueekkeffhfdufffhuddvleeiffetffffudfgheejiedtgfevtddvvdfg
X-Vade-Analysis-6: leenucfkphepjedtrdeggedrudekjedrkeefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghm
X-Vade-Analysis-7: pehinhgvthepjedtrdeggedrudekjedrkeefpdhhvghlohepqhhuvggvghdrmhgvnhgrshhirghnshdr
X-Vade-Analysis-8: tghomhdpmhgrihhlfhhrohhmpehmvghnrghsihgrnhesphhtugdrnhgvthdprhgtphhtthhopehgvggu
X-Vade-Analysis-9: rgdquhhsvghrseguvghlohhrihgvrdgtohhmpdhrtghpthhtohepshgtmhesmhgvnhgrshhirghnshdr
X-Vade-Analysis-10: tghomhdpmhhtrghhohhsthepshhmthhptddvrdhpthgurdgvmhgrihhlqdgrshhhuddrshihnhgtrdhl
X-Vade-Analysis-11: rghnpdhnsggprhgtphhtthhopedvpdhishgpnhgrpehtrhhuvgdprghuthhhpghushgvrhepmhgvnhgr
X-Vade-Analysis-12: shhirghnsehpthgurdhnvght
X-Vade-Client: PTD
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 43UEUkGK3668553
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 30 Apr 2024 10:38:37 +0200
"Richard Rasker (rasker AT linetec DOT nl) [via geda-user AT delorie DOT com]"
<geda-user AT delorie DOT com> wrote:

> Hello Karl,
> 
> Thank you for your explanation. So there is no easy solution that I 
> overlooked. This hierarchical numbering seems rather complicated; I 
> think I'll follow upĀ  on your suggestion and write a simple script that 
> maintains a list of all RefDes-attributes in all relevant page files, 
> and simply coughs up the next free RefDes for the most common
> categories of components (R, C, L, U, Q).
> 

Richard:

I wrote a simple program (geda_parts) which when invoked as follows:

geda_parts <schematic_file_base> <reference type>

reference type can be R, C, Q, U, L, T, Y 

opens a schematic file (schematic_file_base.sch) and scans it for
the specified reference descriptor. It outputs a text file
(geda_parts_<schematic_file_base>_<reference_type>.parts.

It has quirks and is a bit buggy. I just haven't gotten around to fixing
it yet since it serves my purposes (mostly). One quirk is that it looks
for schematic files in a standard directory (or linked to the standard
directory). A bug is that it only matches the first letter of the
reference type. (A part designated as CR2 would show up in the capacitor
list). Another is that if I use letters to designate individual circuit
functions in the same package (i.e. Dual op amp might be designated as
U3A and U3B), both are shown in the final list (without the A and B).

It lists other significant part attributes. It was written to create
starting points for parts lists. It has proven handy in manual
renumbering to detect gaps n the parts list sequence or duplicated
reference descriptors.

Here is a typical output:
-------------------------------------
C1      CAPACITOR, Polypropylene 0.10uF
C2      CAPACITOR, VARIABLE      4-36pF, ceramic
C3      CAPACITOR                0.03uF
C4      CAPACITOR                250pF
C5      CAPACITOR                330pF
C6      CAPACITOR, C0G           240pF
C7      CAPACITOR, C0G           330pF
C8      CAPACITOR, Polypropylene 0.022uF
C9      CAPACITOR, C0G           1500pF
C10     CAPACITOR                1000pF
C11     CAPACITOR                220pF
C12     CAPACITOR, C0G           1500pF
C13     CAPACITOR, POLARIZED     68uF/16V, tantalum
C14     CAPACITOR                330pF
C15     CAPACITOR                ?uF
C16     CAPACITOR, POLARIZED     33uF/20V, tantalum
C17     CAPACITOR, POLARIZED     15uF/20V, tantalum
C18     CAPACITOR, POLARIZED     15uF/20V, tantalum
-------------------------------------

It is written in C. It may serve as a starting point for the program you
are considering writing. Let me know if you want a copy of the source.
It's a single file (325 lines).

Stephen

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019