Update custom part from fzpz

Are there any solution to update a custom part with an fzpz file ?

If I import it, Fritzing says a part already exist with id …

thanks

If both the new and old version of the part are wanted to be accessible at the same time, the new version is supposed to be given a new module ID (in the part definition file). If the new part has the same module id, the old version must be deleted from the MINE bin before loading the new version. That does not delete (or update) the old part version in any sketches it already exists in. That would need to be done separately.

That’s what I discovered and motivate my question.

The least fluid part of the process is to update a component which is already used in a project. This needs to remove the part from all projects, then from the bin, re-start Fritzing …

It is not necessary to (first) remove an old, to be updated, part from existing projects. It is not even necessary to close those projects before deleting the old part from the bin. A copy of each custom part (fzpz content) is store in any project (fzz) that it is used in.

After the part is deleted from the bin, all open projects need to be saved and closed, Fritzing restarted, then the updated part can be loaded. At that time it becomes available for use by new or existing projects. If the new version is fairly compatible, you can use “delete -” on the old part, place the new part, then (in each view) position and reconnect it. Separately for each project file.

If the updated part has a different module id, it can be loaded while the old part still exists in the bin. The replacement of old with new in projects is the same as above. The old and new version of the part in the MINE bin tend to look the same, so a bit of care is needed to make sure the correct version is being placed.

Other than the visual confusion with the versions, it would not matter if the old part was ever deleted from the bin. It could be done at any time, or never. Each project knows which version (or versions) of a part it contains, without reference to what is currently in the MINE bin. The bin is only referenced when a part is dragged from it. Which is why projects files can be shared, without needing to first share the parts in the bin.

The restart Frtizing part of this is a bug which does make part updating annoying. The code believes it has deleted the part completely, but in practice, probably the moduleId is still cached somewhere until Fritizng is restarted. Thus when you try and load the new part, you get the

"a part already exist with id "

message. At some point someone will get around to fixing that, but AFIK it hasn’t been done yet.

Peter