Hi, I just fixed my C.H.I.P. part.
Now I need to replace it onto my PCB without lose wiring.
How could I accomplish this?
Hi, I just fixed my C.H.I.P. part.
Now I need to replace it onto my PCB without lose wiring.
How could I accomplish this?
In PCB view right click on the part and select " Delete Minus ". This will delete the part without deleting the wires/traces. After that you place the new part on the board and drag the ends of the traces onto the pads of the new part. It helps to have the new part off to the side when you drag the ends of the traces on to it and then move it back into place. You will have to reconnect the ends of the wires in Schematic and Bread board view as well.
The other option would be to right click on the part on your board and select " Edit (in parts editor) " and use the drop down to change the SVG’s in each view and then save over your part. It should then warn you that it will update the parts in the sketch with the new SVGs.
Thak you very much, but when I save it, Fritzing creates a new part in the inspector, but does not replace the one onto the sketch.
Do you know what I missed to do?
Thank you so much!
I could be that you are editing the part in the bin not the one on the PCB. You need to right click on the part on PCB not in the parts Bin.
I know if it is a part in the core parts you can not save over the original and it will always create a new part. So if the part you are trying to replace is a core part then you will have to replace it manually by using delete minus. It may even be that your part was created in a way that makes Fritzing think it is a core part and thus you will have to change it manually too.
Hi, I tried again, those are th steps to reproduce what I did (on my own part, not CORE part):
Now I got a new item into “My Parts” browser panel, but onto the PCB there is still the old part.
Then use the delete minus method. It leaves all your traces in place and you just have to reconnect the ends to the part. It only takes a few seconds.
Cricky, another new thing I didn’t know. I put the new part on top of the old part but 1 grid offset, and then connect the wires so it’s in parallel. Then I just delete the old part and move the new in.
I think too, but could you kindly show me how to edit a PCB item and the replace it without creating a new entry into my parts?
I think it used to work in the past, but now it doesn’t.
Now it only seems to work if you right-click a core part and save it as a new part, and then change the svg.
All custom parts will always go to MINE bin no matter how small the change.
Maybe @vanepp can spot the differences in the files and let us know why some can be updated and some always create a new version.
I am uploading a part I created that I have in the past updated and had the parts on my PCB change without creating a new part.
It is a battery holder for protected 10440 Li-Ion battery (47mm long because it is protected) using Keystone AAA #82 THT battery clips.
10440 Clips.fzpz (13.1 KB)
Just maybe Vanepp will be able to notice the difference in this file and your C.H.I.P. part that allow this to be updated while yours can not be…
Well your part is somewhat odd in that it is supposed (according to the fpz file) to have bendable legs, but in fact doesn’t because the legId is missing in the svg and it has a connector property erc (I think probably spice related) that doesn’t seem to be documented and I’ve never seen before (although that is helpful to me because I need to account for it in my python script ). I think the most likely explaination for the difference is bendable legs (which Frtizing may still think it has) as that seems to be the major difference. A workaround for @DareDevil73 may be to replace the svgs under Fritzing. Assuming your part is in the mine parts bin (which it should be) with the sketch loaded (and on Windows, other oses have different paths) the files will be in
c:\Users\username\My Documents\Fritzing\parts\svg\user\breadboard | icon | pcb| schematic. I expect if you copy the new svg (breadboard and pcb in your case) in to the one in that directory that Fritzing will just happily accept the new svg without complaint (or noticing). I think it will also save it, but you will need to try exiting and reloading the part to see if it does. For safety take a copy of the entire fritzing directory before doing this, because screwups will corrupt the parts database and crash Fritzing (you probably also want to keep a copy of c:\users\username\AppData\Fritzing\roaming\Fritzing which is the actual parts database). If things screw up, moving these two saved directories back in to place will recover Friitzing (as will deleting both of them, but then you lose all your work which is usually undesirable ). Meanwhile I’ll experiment with making the changes as above and see if it is bendable leg parts that make the difference.
OK, found the secret. Both the old and new part have to be in the mine parts bin at the same time otherwise when you try and save in the new parts editor the save button is greyed out and you can only save as a new part. This works as desired (you may want to make sure you have a backup of your fritzing parts directories before trying this, I do it as a matter of course before trying anything like this ):
load the 10440 part from above, and drag in a 2 pin connector from core and connect them to set pcb traces. I have a sketch with this done, but the 10440 part is preloaded and thus doesn’t work, (probably because it will be in bin temp not mine). Now from core, search for battery and parts edit the 2 AA cell part that the 10440 was cloned from and save as new part (so there will be two of them in mine now the 10440 and the clone from core). Now in pcb view do the parts edit on the 10440 part and click on pcb view then file->load image for view for me the directory is
(although it was somewhere else in a parts factory directory on a previous try) which contains:
(I’m not really sure why so many files, but it doesn’t seem to matter). I double clicked prefix0000_4e5dc67f03b72b14781f9bff55e9f212_1_pcb.svg which loads the different pcb from the core battery in to PCB. Now file->save (as opposed to file->save as new part) is also active and when clicked asks for a prefix (where I used the default and clicked ok) and then it prompts that it will make non reversable changes to the sketch. Clicking save changes the part on the pcb to the new (now broken) footprint although on a closer view I see that it is broken. I hope on a part with an identical footprint and connections the connections will change correctly. The secret appears to be having all the files in the same parts factory directory, so probably starting parts editor then manually copying the file you want to add in to the directory parts editor displays outside of fritzing will also allow you to substitute the files maybe (it may have more state that isn’t visible from the creation of the parts in the mine parts bin though).
This is because I use the parts editor and it warns you when you open something with bendable legs that it will break it. I didn’t care because I don’t use the Breadboard view.
If I understand correctly what you are saying is you need to edit a core part and save it as a new part. Then you have to edit that modified version into the new part you want so both the part you edited and the part it is based on are both in your “mine” parts bin?[quote=“vanepp, post:12, topic:4337”]
I’m not really sure why so many files
This has something to do with the way the parts editor works. It appears to create a copy as soon as you open/save a part even if you don’t make any changes. I have deleted all but the latest versions without problem.
Does this in anyway allow DareDevil73 to change his part easily or does this mean he has to change it using the delete minus method once with his new version before any future changes are as easy as changing the SVG in the editor?
So It has to be a created part in MINE bin and “Save” only, and it live updates in the sketch. Makes sense
I’d try this first: load the sketch. The current part should be in temp, so after making sure you know what the file name of the new part is (to do the swap with the right file) load the new part in to the mine parts bin, then move it in to the sketch (but don’t connect it to anything). Now save the sketch and re open it. I think that both parts will now appear in temp and the same rules may apply, its in the same parts bin so it may do the same, but I just tried it and no it isn’t the same. It still greys out the save button leaving only save as a new part (without the option of replacing it) so this won’t help him. Before you try this be aware that the fritzing “I forgot to delete that file” bug applies here, so if you follow these steps when you reload the sketch it will not be able to read the new file you added and hangs Fritzing and you need to delete the my documents fritzing directory to recover from it (its possible just deleting the files in the parts and svg directories that aren’t supposed to still be there would also be enough, depending on whether the parts data base is corrupted too). For me this isn’t a worry as I don’t keep anything not backed up elsewhere in the my documents fritzing directory because I cause this so often but its potentially deadly for someone without such a backup. Too bad this hack didn’t work because it would solve the problem. Looks like a source change is the only solution (since we know it can work under some circumstances). Another bug/enhancement for the list …
edit: Is there a way to move a part between bins? I can’t find one but that doesn’t mean anything . If we can move the part from temp to mine this fix may still work but I can’t see a way to do that.
Peter since you seem to understand the file structures being used by Fritzing I have an I idea that you may be able to implement but I feel is beyond my understanding since I use the Editor all the time.
When you have the sketch open Fritzing creates a temporary copy of the open sketch in your Fritzing config directory. If you open the temp folder it has the temp parts broken out into pieces including a temp version of the part file and SVGs. Maybe you can figure out how to change the files in there. Then all you would do is click save in the open sketch, close Fritzing, reopen Fritzing and your sketch and it should have the new part.
Yes I just thought of that and am experimenting to see if it will work. It looks like you need to do it in a parts factory temp directory rather than the usual place and I don’t know yet if the connections will work, but I have a copy of his original part that I made a test fzz from and am going to try and get the new part in to it. I need to add a prefix to the new part so I can tell the two apart because the file names are both new though.
I think in this case, it can’t be done. The problem is that the pin numbers on the board appear to have changed since the first versions. If I compare the original CHIP.fzpz with the latest one, the breadboard view connector pin numbering is different (and the orientation of the board is rotated 180 degrees as well). Assuming the sketch you are trying to change uses the original part, the pin number change is going to screw up the routing (as the connector numbers have all changed). So I don’t think there is a way (even the " Delete Minus " isn’t going to work I don’t think because the traces will go to the wrong pins) to do the substitution. There look to be two choices: redo the entire sketch using the new part, or change the new part so the orientation and pin numbers are the same as the original part in the sketch, in which case at least the " Delete Minus " should work and there may be a way to manipulate the underlying files to do the substitution (although I haven’t made that work yet, but that may be because of the connector change which I hadn’t noticed).
As part of the try above I have found another Inkscape oddness: it won’t rotate polygons. As the new part is 180 degrees rotated from the original I did a select all and rotated it twice. While most things rotated, the connector polygons do not leaving the connector pins in the wrong place. Does anyone know how to make polygons rotate with the rest of the drawing (I tried ungrouping everything, that didn’t help). I’m running 0.9.2.1 so should be on the latest version.
I would try converting them to paths first. That should mean they are no longer polygons.
Path/Object to path
Path/Stroke to Path