Update Core part

I use 3.6mm or less length resistors and Steve Lilley alias steelgoose has provided me with an update that allows me to use a variant of the standard resistor package THT mini. The problem is if I try and distribute my sketches as other people will not have these changes, Is there someway that he can get his changes adopted by Fritzing. I looked at the github for https://github.com/fritzing/fritzing-app/tree/master/resources/parts/core but did not see the standard resistor

The resistor is treated specially in Fritzing. Because there are so many variants of it, it is a programmatically generated part (see https://github.com/fritzing/fritzing-app/blob/master/src/items/resistor.cpp). Did you receive a custom-built version of Fritzing, that has this file modified?

But it could also be that you received the part as a separate, independent part definition (as a .fzpz file that you imported for example). In that case, this custom part is automatically included when you save your sketch, making it safe to share.

This was the email I received from Steve Lilley

Ok Keith,

Copy the file “resistor_mini.fzp” into the parts/user/ (fzp) folder “not the core folders”, copy the file “resistor_mini.svg” to the parts/svg/user/breadboard/ folder, then restart Fritzing. It will show up as a variant “THT-mini” in the Core resistor part.

Interesting, how the myparts fzp picks up svg files from the core folders, so the rest of the SVGs used by the mini.fzp do not need to be copied to the myparts folders.

Everything works (color bands, resistance, tolerance), the only thing that doesn’t work is the adjustable pin spacing in the pcb view, I have it default at 200mils. You can have it default at whatever spacing you would like. I believe this is because it is written in the DLL files for the ModuleID to select the spacing. I can’t use the same ModuleID or the mini resistor overrides the standard resistor.

Steve

Thanks, that clarifies it. This works, but is not advised: modifying anything in the application folder means that a) these changes will get lost with the next update and b) Fritzing cannot identify them as custom user parts.

The “correct” way to do this would be to create the part in your Fritzing user folder, either manually or using the parts editor. That folder is unfortunately quite hidden, see https://github.com/fritzing/fritzing-app/wiki/2.1-Part-file-format#folder-structure for your operating system.

Every sketch that is then created with this part will also have the part included in it.
If you want to share just the part, right click it to export it (resulting in an .fzpz file), so someone else can then import it.

Steve understands this more than me. I emailed him your response and this was his

Morning Keith,

It’s morning here… afternoon there…

The resistors are not really parts in the database, they are generated by a part-gen-script. When creating a part, they are temporary created in the User “Part Factory” folder. When saving your project, the specific part in the Part Factory is added to your project, the Part Factory parts will be deleted. When your project is reopened that specific part (resistor) will be added to a Temporary Folder.

The only way the mini resistor can be added to Fritzing core part is to be added as a variant in the resistor part-gen-script and released in the next version of Fritzing. The last version, Version 0.9.2b was released on April 3, 2015, if added it wouldn’t be available until the next release.

Probably the best way to get it added to the core DB is to send the breadboard (resistor_mini.svg) to andre (Fritzing leader) and see if he could add it to the resistor part-gen-script in the next version.

As of right now, the only way that I know to share it with your friends is the way I gave it to you to install.

Instead of adding it to the MyParts folders, it could be added to the application folders, but like andre said, it would be lost on the next update.

I can add the breadboard “resistor_mini.svg” to my dropbox and ask andre to add it as a variant to the resistor family for the next update.

~Steve~

Andre,

Attached is the DropBox link to the mine resistor files. http://tinyurl.com/z7yobz6

~Steve~