X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=mUo+ur3sGpZdEEyY2zfKs6rFjzQ0iotXYfVHrM3If9c=; b=sT9+GlUwdDAWfBsabq3RTkEpL9tHExBB3GYjmQLvT01XL8VHmU6johNrMi69c+AFAj HOPW94CGKYzoKzkUxf5YCl2U0yvBQkxQQ9E1hbCUnNm6G3P2eAFlk8cPoMXCmqJZ8owo CWaAWGdWgP7jK6sF9DaCrbSd2P3KNniegc0UlRY649QEs0JhBPzdxF1AX05PFLBXd/D/ 7eOVfYNUb1KA4w/pYJufnJeFia5rtREGD9auoXxkdFTjabkK9D6yF2Vw8d8eAYRmNl+X ZIdCAUEaq8U/fcLxWQkDQIaNgvzKiIDOpk3So5P1vY0V5VzxqaSASno4eLhgZmpqPyw6 NJ3A== MIME-Version: 1.0 X-Received: by 10.50.3.67 with SMTP id a3mr27100947iga.42.1415649923080; Mon, 10 Nov 2014 12:05:23 -0800 (PST) Date: Mon, 10 Nov 2014 11:05:22 -0900 Message-ID: Subject: Re: [geda-user] Renumberblock for gschem? From: Britton Kerin To: geda-user AT delorie DOT com Content-Type: multipart/mixed; boundary=089e013cbd5ecac929050786aef3 Reply-To: geda-user AT delorie DOT com --089e013cbd5ecac929050786aef3 Content-Type: text/plain; charset=UTF-8 Attached are a couple scripts maybe helpful for this or related work. One is for the case where you have a subcircuit shematic and associated pcb layout for that subcircuit, the other is for when you don't. They are both for the pcb end and you use them by selecting some in the PCB, running the script, then reloading from PCB. The comments at the top explain how to use them more precisely. Britton --089e013cbd5ecac929050786aef3 Content-Type: application/octet-stream; name=rerefdes_layout Content-Disposition: attachment; filename=rerefdes_layout Content-Transfer-Encoding: base64 X-Attachment-Id: f_i2c9d8cp0 IyEvdXNyL2Jpbi9wZXJsIC13CgojIFN1cHBvcnQgdGh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Bkb25lIHdoZW4gd2Ugc2VlIHRoaXMKCiAgICBtL15FbGVtZW50XFsuKlte XHddc2VsZWN0ZWRbXlx3XS8gb3IgbmV4dDsKCiAgICBtLyRuc3JwLyBvciBuZXh0OwogICAgbXkg JHJkID0gJDE7ICAgIyBSZWZkZXMKCiAgICAjIE5vdGUgdGhhdCB3ZSBlYXQgdXAgdGhlIGNvbnRl bnRzIG9mICVybXNyZCBhcyB3ZSBnbwogICAgaWYgKCBleGlzdHMoJHJtc3JkeyRyZH0pICkgewog ICAgICAgIG15ICRjc3IgPSAkcm1zcmR7JHJkfTsgICAjIEN1cnJlbnQgU3ViY2lyY3VpdCBSZWZk ZXMKICAgICAgICBzLyIkcmQiLyIkY3NyIi8gb3IgZGllICJmYWlsZWQgdG8gc3Vic3RpdHV0ZSBp biBzdWJjaXJjdWl0IHJlZmRlcyI7CiAgICAgICAgZGVsZXRlKCRybXNyZHskcmR9KTsKICAgIH0K fSAjIH19fTEKCmtleXMoJXJtc3JkKSA9PSAwCiAgICBvciBkaWUgImRpZG4ndCBtYWtlIHRoZXNl IGV4cGVjdGVkIHN1YnN0aXR1dGlvbnM6XG4iLkR1bXBlcihcJXJtc3JkKTsKCm9wZW4oUEYsICI+ JHBmIikgb3IgZGllICJmYWlsZWQgdG8gb3BlbigpIGZpbGUgJyRwZicgZm9yIHdyaXRpbmc6ICQh IjsKcHJpbnQgUEYgQHBmbDsKY2xvc2UoUEYpIG9yIGRpZSAiZmFpbGVkIHRvIGNsb3NlKCkgZmls ZSAnJHBmJzogJCEiOwoKcHJpbnQgIlVwZGF0ZWQgIi5zY2FsYXIoa2V5cyglcm1zcmRfY29weSkp LiIgcmVmZGVzZXM6XG4iLkR1bXBlcihcJXJtc3JkX2NvcHkpOwoKZXhpdCAwOwo= --089e013cbd5ecac929050786aef3 Content-Type: application/octet-stream; name=rerefdes_repeats Content-Disposition: attachment; filename=rerefdes_repeats Content-Transfer-Encoding: base64 X-Attachment-Id: f_i2c9dgsq1 IyEv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