4 position linear switch request (pretty please)

Hi, my first time ever using such software. I tried to get an understanding how parts are being made, or how to modify one, but didn’t get it yet.

I found a switch in the database ( SS13D01 ), which has 4 pins, 3 positions, but the one I need requires 5 pins, 4 positions. I’d appreciate if someone can modify that one for me and if there isn’t much to ask, a quick explanation of what had to be done in order to modify it. Didn’t seem to find a way how to add more contacts in part editor.

Thank you.

It is fairly complex, there are a series of tutorials but the learning curve is fairly steep. These three apply to the latest version of Fritzing, most of the rest are for older versions (pre parts editor):

I can do that easily enough (it is usually the best bet if you are new to part making), or perhaps there is one somehwhere, but I need the data sheet or at least a part number that will lead to the data sheet for the switch you want to know what it needs to look like.

Parts editor was not completed when development stopped in 2016, thus can only add new connectors in the fzp file, not the underlying svg files (I’m not even sure it can add connectors new connectors at all, but I am not all that familiar with parts editor either.) Thus you need to use a svg editor such as Inkscape to modify the svg files (which implies you know the format to do that which is poorly documented.) That is part of what makes part creation difficult (and the lack of documentation doesn’t help.) I generally find parts editor not worth the effort and just modify the underlying files directly, but that requires knowing what the files need to look like.


The one that I have in hand is this one:

but I can use any generic 4 position switch for the schematics. The switch holes for pcb aren’t important, as it will be mounted freely and wires drawn from it.
This one could be a good source for a part model, I guess: https://www.chinadaier.com/4-position-slide-switch/

When I made this post, I assumed it would be rather easy to modify the existing switch and add another set of contacts. It’s only needed for wire routing, so they don’t float randomly and give me hard time.

Off-topic: you mentioned the development of the part editor stopped in 2016 … is it going to be continued? Is fritzing being still developed or is a dead end?

Once you have climbed the learning curve. parts making is fairly easy, as was this one. It is possible to make a partial part even more easily, but I prefer to make proper parts that could be submitted for inclusion in core. A full part is useful for anyone else that needs the part (and may need the full part not a partial.) As requested here is how I did this part (with notes on how you should do it where that differs from what I did.) I copied the existing SS13D01 files in to a new directory and modified them, if you are not very familiar with making parts you should load the SS13D01 part in to Fritzing and edit it with the new parts editor. Change the metadata tab to match the new part (change the various labels to match the new part.) Particularly change the family name in the properties section as the family needs to be unique to this part. Then save the new part, export it and unzip the resulting fzpz file to give you the 5 files that make up a part: the fzp and 4 svg files. Now using aa svg editor such as Inkscape, edit the breadboard svg. Ungroup it completely then add the extra pins by duplicating them. In this case because the original part was single pole I interleaved the pins with a .1 offset in y to make the needed dual row of pins and expanded the length of the rectangles to cover the new pins leaving this:

Now on to schematic, edit the schematic svg and as with breadboard add the necessary pins for the 2nd pole and (from the data sheet for the switch) set up the switching configuration: the 4 lines with arrows all connect together and will move one terminal position with each indent I believe. Again add and number the necessary new pins to get this:

Now on to the pcb svg. In this case because it connects with wires, pcb is not the same as real life but rather a dual row 10 pin header which will accept either .1in headers or wires soldered in to the pads. Again add the new connectors and number them correctly giving this:

Now all your svg files are created and you could run the resulting svgs through FritzingCheckPart.py (to remove the xml that the svg editors add that Fritzing won’t accept) or do the same via a text editor on the svg file and load them in to the new parts editor to assign the pin numbers. I chose (as I usually do) to directly edit the fzp file to do the same thing. I used FritzingCreateFzpConnectors.py to create the new connector defiinitions (which I believe you need to do anyway, I don’t think parts editor will create new connectors although I could be wrong), and added that to the fzp file and added the pin name and description fields. Then I ran FritzingCheckPart.py on the fzp file to make sure everything was ok. The script checks the syntax of all the files and insures all the connectors are defined if not placed, correctly and as noted cleans up a number of svg editor issues. Then all that was left is to load the part and test it in Fritzing to make sure all the connections are correct and the gerber export is correct (there are a number of bugs which make a board look fine in Fritzing but not in the gerber output.) As all that checks here is the completed part:

ss-24no1.fzpz (5.7 KB)

The Aisler (who run the fab) CTO has succeeded in getting development restarted. The 0.9.4 release made a month or so ago is the first result of that effort. It is mostly a test of the new build environment (the previous one no longer exists) with the handful of bug fixes committed since 2016. Assuming we can get funding from donations to fund professional developers there will be more releases. The code base is to complex to depend on volunteer developers (I have been trying that route for the last couple of years without any notable success) so a revenue stream is needed. The jury is still out in whether that will be successful, but the new release at least buys fritizing a couple more years before bit rot destroys it again (the current release had already started to fail due to unsupported library versions on some OSs). Hopefully development will continue.