I changed it a little bit… self explanatory; copy, renumber, and move right pin-3 group. Pin-1 and 2 are stationary in left group. This one has left, center, and right section.

Resistor Array_expandable_v2.fz (1.8 KB)


Joining the discussion a bit late, it could use a dot on pin 1 (which in the bussed or star version of this is the common pin). Again in the bus version (which is mostly what I use) the common sizes are 5, 9 and 10 pins for 4 resistors plus common, 8 resistors plus common and 9 resistors plus common. This was on my list to do once I get parts creation figured out but if someone else is doing it so much the better :slight_smile: .

Peter Van Epp


Where you been Peter… you leave me out here all by my lonesome… Yea… I thought about the dot. There is other labeling that needs to go on it… haven’t got that far yet. I was wondering if there was a way to generate the value on it… This is kind of an experiment using a Python script to generate parts. I might learn something here. I want to create a working model before I get to far on it


Several days of playing with motors and opto interrupters (which aren’t as fast as I’d like :slight_smile: ) which finally ended up with me deciding that the optical encoder disks on cheap ebay motors are worth buying some more of (throw the motor in the corner as basically useless and use the optical encoder which with enough care can be pried off the motor shaft to be redeployed on more powerful motors.
This approach should work fine in stuff like this which has identical sections of varying size. Either perl or python can parse xml (I expect there is a python xml parser as well as the perl one, but even the normal text tools in either language should work for something as simple as this). I’ll admit to thinking that perl/tk might be an alternative to Inkscape for svg creation since I believe tk is vector based (I haven’ t actually used it in for years though and may be misremembering) and going from the vectors to xml shouldn’t be that big a deal. A lot of the problems I’m having with Inkscape are because it is trying to do way more than I actually need and that makes it complex and painful to use.

Peter Van Epp


Thanks a lot for creating that image! I finished the script for creating the breadboard-images. You can find it along with generated content in the attachment (same as before: a zip hidden as fz).

Is the generated output usable/helpful? If so, I’m glad to extend this for the schematics and PCB-view!

Resistor_Array.fz (26.6 KB)


Works perfect… there are a couple of little things I should clean up on the image. That is pretty slick. I had made 32 connectors for the core library… took me days. When I wanted to edit one, I had to edit all of them, one at a time.

Two things: This may be a very dumb question. When I open one of the resistors up in Notepad++, it is all one long line run together, difficult to read. How do I change the format so that each function starts off on a new line number?

How do you write and run these Python scripts?..

I guess you can write the .fzp files the same way.

I will put the rest of the files together for you along with FZ format.

~ see one, do one, teach one ~

4x5 Key switch pad with LEDs (YL-4)

Glad to hear that it works out that well! :blush:

It is really easy to do those things in Python once you figured it out one time. It’s only a bit tedious to convert the svg into this “dynamic“ format. I’m using a library to generate those svgs (called svgwrite). There are however a few things to watch out for:

  • The library is really strict about the syntax. So the extra fritzing-tags aren’t possible. What I’m doing is placing the gorn-attributevalues as classes and later rereading the file and replacing class with gorn.
  • I’m not sure, why there are no linebreaks. I noticed it, too. I guess the library doesn’t generate some. If it’s a real issue I could add a quick fix and insert linebreaks after each tag upon rereading the file. Adding the correct indentation could be hard however (alternatively I could search for a XML-tidier, should exist already).

To run this script (assuming you have python installed), firstly you need to install svgwrite e.g. via pip install svgwrite. Then running python should do the trick. Currently the last five lines generate the actual output. I’m planning once whole parts are created to change it that you could pass parameters via the terminal into the script. E.g. -star -r 5.

Thanks again for your help! If this works out, maybe the script can be abstracted to generate all sorts of variable components.


I took the gorn’s out… they are not needed, FZ generates them and when I use files that FZ generate in CorelDraw, the gorn is labeled as svg tags of some kind and cannot be extracted from the element. The only way I can delete them is in a svg editor. Most of the time I just leave them in as they don’t normally cause a problem.

Attached is the part file for a 3-pin Bussed, I have been screwing around with it for hours trying to figure out how the get the “spice” to work for the resistance and tolerance. It keep jumping back to the single resistor. This works under the family “resistor” along with the other resistors. You probably understand this better than I do. If we can’t tap into the spice for the single resistor, then may need to use a new family name like “resistor-array” for both the Bussed and Isolated and write a new spice. Supposedly you can create your own spice, I just don’t know how.

You can load this file into FZ and see what I mean. Get this down to a science then we can work on the smd packages. :confounded:

Resistor Bussed 2R.fzpz (6.8 KB)


Ah. Got it. Sorry, I didn’t know what to do with it. I’ll remove it from my script.

I’ll complete the script for generating the other views out of what you just sent me during the week and then complete it to make one neat package.

Regarding SPICE: I honestly have no idea. I never used it really (maybe two times during study but that was it). I’ll first have to make myself more familiar with it. Is this a requirement or just an added bonus?


Here are the 2 resistor files, Icon is just a duplicate of breadboard. I included both bussed and isolated schematics. I also cleaned up all of the gorn tags.

schematic should be in the schematic layer… although it works without it…
breadboard should be in the breadboard layer.
pcb needs to have the silkscreen layer and the pins embedded in the copper1/copper0 layer.

Resistor_Array.fz (7.0 KB)

Awhile back I bought an RPi just so I could play around with Python… I loaded Python on my PC but I never got a display and usb keyboard for the Pi. That PC died and I never installed Python on this one yet. Sometimes my poor-ole-brain just does not want to absorb all of this stuff… :unamused:


Assuming you are running windows, cygwin is a good way to get Python or perl. You get a (mostly) Linux environment integrated with Windows I run it on all my windows machines.

Peter Van Epp


There you go… messing up my brain again… :grin:


I lied… I had Python 3.5 on this machine… :relaxed: Too many irons in the fire…


Well, did you get it all figured out? I create parts similar to the core parts; make all the view files and the .fzp then zip them all up into the .fzpz and skip the parts editor all together. I guess you figured that out by now.

Have any luck with the spice thing and getting the resistance and tolerance to work?

I had Python on here all the time… don’t know when I loaded on here. I loaded PiCharm Edu on here too as a coding refresher course… Maybe I will get back into it a little bit… Always wanted to learn Python…


Sorry for my late response. Shedules are getting a bit tight here. After the weekend my day should be much more free. I’ll keep you posted.

Getting the svgs to work is really no problem at all – just a bit of work. Making the actual package will take a bit more practice to port over to python. I’ll wrap my head around that after creating all the images.

Regarding Spice: I’ll really have to do some research here. I do not have any knowledge at all about that – although the corresponding course was only two years ago. :confused:


I don’t know if creating the .fzp with Python would be worth the time and trouble… my be easier to just assemble them by hand.

I will check with the core people to see if there is a way to add the resistor spice to these arrays…


Are you guys trying to make an internal part that uses a 1 section svg that is stacked when you select the pin count, like a header, but with 3 parts, or is this some external script to make the svg.


Just a script to generate the svg and trying to figure out how to add a spice model for the resistance and tolerance.


Hello everyone,

after a bit of silence I’m back with all required SVGs. PCB, Breadboard, Schematics and Icon are generated. Do you spot any errors? If not, I’ll proceed in trying to package everything up. Is there anything new on SPICE that I could include in those files?

I’ll be back with more if everything goes well. Else I’ll be back with questions. :smiley:

Resistor_Array.fz (56.4 KB)


In PCB the silkscreen is white, we are changing it to black these days to make it easier to edit the svg.