This forum is archived, go to the new forum!

This is the old fritzing discussion forum. Search it for valuable information from 2009 to 2015.

Can't get a new part working

surfhai 8 years, 12 months ago

Hi, here is a new Part that I need for my project. The problem is that the connections that I set up in the Parts Editor are displaced.

surfhai 8 years, 12 months ago

How can I get correct connections. I tried to move the anchor but it can't be displaced.

Jonathan Cohen 8 years, 12 months ago

Several things.  

First, when using an image created by Inkscape, remember to "save it as plain svg".  This option is available from the "Save As.. " menu of Inkscape: it's a pop-up at the bottom of the save-as dialog.  Your pcb image has been saved as an Inkscape svg, not as plain.  Inkscape puts a lot of extra metadata in there, and though Fritzing tries to filter it out, sometimes Fritzing gets confused.

Second, anchor points are probably not required in this case--they are only necessary if you are trying to change the default point at which a wire will attach to the connector.  The default point is the center.  So turn off the anchor points checkbox in the parts editor.

Third, make your work area bigger so that it's easy to drag either a whole connector rect (mouse-down in the middle of the rect) or one of the corner handles.  There are two features that will help.  

  • Use the zoom (mouse wheel or + - buttons) to zoom into the image pane you're working on.  
  • There are three splitter controls in the parts editor window, one between the breadboard and schematic image; one between the schematic and pcb image; and one beneath the three images and above the Specifications/Connectors tabs.  Use the splitters to make the image you want to work on very large (and everything else very small).

Fourth, it looks like you did some hand-xml editing.  This is fine, but in SVG, decimal points are periods and not commas.

Hope that helps.

- j



surfhai 8 years, 12 months ago

inkscape has done the whole xml it's not hand edited. I saved the svg files as Normal svg in inkscape and it was the same result this part

Jonathan Cohen 8 years, 12 months ago

Maybe I am not understanding your original issue.  I have downloaded your fzpz file, and imported it into Fritzing (on both Windows and Linux platforms).  I then opened it up in the parts editor, zoomed in to breadboard, schematic, or pcb views, clicked on connector rectangles and/or corner handles, and dragged them into new positions.  As the mouse moves over a connector rect, the cursor icon changes.  If I save the part, the new connector locations are there when I drag the part into a sketch.  

What exactly is going differently for you?


surfhai 8 years, 12 months ago

I created the part with different connector positions. After saving the part and reloading it in fritzing the connector rectangles are displaced...

This picture shows which effect I mean

Jonathan Cohen 8 years, 12 months ago

I'm still not able to replicate this problem.  When you say "reloaded", do you mean that at some stage, the new part was already in a sketch, you opened it in the parts editor, made some changes, clicked "save", and Fritzing put up a message saying that it needed to restart in order to update the sketch?

I'm down to guesses.   First, Is it possible there are multiple versions of the part floating around?  Do you see multiple icons in the "mine" parts bin?  Second, could there be some kind of permissions issue so that the changes didn't actually get saved?

- j

Jonathan Cohen 8 years, 12 months ago

Two more questions.  What happens when you drag the from the parts bin into a new sketch.  And second, is the displacement random or from the previous state of the part?

surfhai 8 years, 12 months ago

I've made a video to show you what's the problem.

Jonathan Cohen 8 years, 12 months ago

Thanks for taking the trouble.  But the url I'm following above seems to be the same one as the previous still image.

- j

surfhai 8 years, 12 months ago

sorry :)

Jonathan Cohen 8 years, 12 months ago

Thanks, that makes the problem very clear.  I will do some investigating and get back to you.

- j



Jonathan Cohen 8 years, 12 months ago

Hi Surfhai,

I'm still stumped by this one.  Since so far I have been unable to replicate the bug, maybe you could do some investigating--have a look at some files on your computer?

One odd thing I notice in the video is that the "save" button in the parts editor is greyed-out.  This would normally only be greyed-out if you were either editing a core part or a contrib part--that is, a part that was imported from an fzpz file.  Was that how the part was loaded?  

I think you're on a linux platform?  At least in Ubuntu, imported and edited parts are stored in ~/.config/Fritzing/parts.  (By contrast Core parts are stored in whatever folder you extracted Fritzing.)  There are a number of files I'd like you to have a look at there (or wherever your equivalent user folder is).

There will actually be 5 files for your part: an .fzp file and 4 .svg files.  Your 7-segment .fzp file will be stored either in .../parts/user or .../parts/contrib.  (based on that greyed-out save button, I'm guessing "contrib").  The four .svg files will be in subfolders of .../parts/svg/user or .../parts/svg/contrib (again, I'm guessing "contrib").  The subfolders are "breadboard", "icon", "schematic", and "pcb".

One other file I'd like you to have a look at is the "mine" bin.  This would be stored somewhere like ~/.config/Fritzing/bins/my_parts.fzb.

So my questions are:

  • Is the non-core Fritzing parts folder in .config and if not, can you figure out where it is?
  • Is the part in user or contrib?
  • Do you see multiple fzps/svgs or only one per folder.  In other words are there 5 files or do you see more than that?  It's not necessarily a problem if there are more.
  • Once again get ready to edit the part.  Before you do so, check the files and remember how many of them there are, and what the dates and times are.  Now edit and save the part.  Did any of the svg or fzp files get updated?  Did new ones get created?
  • If you open up the fzp file in a text editor, (inside the views element) it should refer to to 4 svg files .  Is it referring to the right (latest) svg files?
  • if you open up my_parts.fzb  in a text editor, it should refer to your part's fzp file.  Is it pointing to the right place?
Let me know what you find out.  


- j

Jonathan Cohen 8 years, 12 months ago

PS.  If the part is in both user AND contrib, that could be the problem.  When you start up Fritzing do you get a warning message saying that it found a non-unique part ID?

surfhai 8 years, 12 months ago

I have - removed the ~/.config/Fritzing dir - imported my part - opened the part in the parts editor and saved it as new part - removed the imported part from mine - edited the added part and the result was the same as you can see in my previous video

you were right there was an message that the part hasn't an unique ID.

It get updated and created new files, but I don't know to which files it refers because there is no absolute path :)

~/.config/Fritzing/parts/user/7-Segment LED Display__d22c0185380ca887ab512de85218d4a5.fzp:

~/.config/Fritzing/parts/contrib/7-Segment LED Display__17afae6a08ab01935ab4c071f7d1378c.fzp:

tg:~/.config$ ll -R Fritzing/ Fritzing/: insgesamt 16K -rw-r--r-- 1 tg tg 342 24. Okt 11:52 Fritzing.conf drwxr-xr-x 3 tg tg 4,0K 24. Okt 11:52 backup drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:36 bins drwxr-xr-x 5 tg tg 4,0K 24. Okt 11:33 parts

Fritzing/backup: insgesamt 4,0K drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:52 41e162e12bada927ec0aca4afba2a349

Fritzing/backup/41e162e12bada927ec0aca4afba2a349: insgesamt 0 -rw-r--r-- 1 tg tg 0 24. Okt 11:52 lockfile.txt

Fritzing/bins: insgesamt 8,0K -rw-r--r-- 1 tg tg 631 24. Okt 11:36 my_parts.fzb -rw-r--r-- 1 tg tg 141 24. Okt 11:33 search.fzb

Fritzing/parts: insgesamt 12K drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:35 contrib drwxr-xr-x 4 tg tg 4,0K 24. Okt 11:33 svg drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:52 user

Fritzing/parts/contrib: insgesamt 12K -rw-r--r-- 1 tg tg 8,7K 24. Okt 11:35 7-Segment LED Display__17afae6a08ab01935ab4c071f7d1378c.fzp

Fritzing/parts/svg: insgesamt 8,0K drwxr-xr-x 6 tg tg 4,0K 24. Okt 11:33 contrib drwxr-xr-x 6 tg tg 4,0K 24. Okt 11:33 user

Fritzing/parts/svg/contrib: insgesamt 16K drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:35 breadboard drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:35 icon drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:35 pcb drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:35 schematic

Fritzing/parts/svg/contrib/breadboard: insgesamt 16K -rw-r--r-- 1 tg tg 15K 24. Okt 11:35 7-Segment_LED_Display17afae6a08ab01935breadboard__ca76f4fc6c9db59ede69dcf374257eee.svg

Fritzing/parts/svg/contrib/icon: insgesamt 16K -rw-r--r-- 1 tg tg 14K 24. Okt 11:35 7-Segment_LED_Display17afae6a08ab01935icon__05837417377115de2491c28581600399.svg

Fritzing/parts/svg/contrib/pcb: insgesamt 8,0K -rw-r--r-- 1 tg tg 7,6K 24. Okt 11:35 7-Segment_LED_Display17afae6a08ab01935pcb__15166201d54e442dd97e653bff04926e.svg

Fritzing/parts/svg/contrib/schematic: insgesamt 8,0K -rw-r--r-- 1 tg tg 6,4K 24. Okt 11:35 7-Segment_LED_Display17afae6a08ab01935schematic__8d2781f349796dba3a9eeee40c1ba55a.svg

Fritzing/parts/svg/user: insgesamt 16K drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:52 breadboard drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:33 icon drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:52 pcb drwxr-xr-x 2 tg tg 4,0K 24. Okt 11:52 schematic

Fritzing/parts/svg/user/breadboard: insgesamt 64K -rw-r--r-- 1 tg tg 15K 24. Okt 11:36 7-Segment_LED_Displayd22c0185380ca887abreadboard1c655a67c27cb74e77e5a29632dd00f7.svg -rw-r--r-- 1 tg tg 15K 24. Okt 11:52 7-Segment_LED_Displayd22c0185380ca887abreadboard4a53d3380306f96f07ecb8522bc30a60.svg -rw-r--r-- 1 tg tg 15K 24. Okt 11:50 7-Segment_LED_Displayd22c0185380ca887abreadboard58e6be37720de71de8b701ef9d0dd940.svg -rw-r--r-- 1 tg tg 15K 24. Okt 11:36 7-Segment_LED_Displayd22c0185380ca887abreadboarddb159a4c370abe7f29026b90cc217b2c.svg

Fritzing/parts/svg/user/icon: insgesamt 0

Fritzing/parts/svg/user/pcb: insgesamt 32K -rw-r--r-- 1 tg tg 6,3K 24. Okt 11:36 7-Segment_LED_Displayd22c0185380ca887apcb096334eaa7ea9bd5b1aff5ca3c770bec.svg -rw-r--r-- 1 tg tg 6,0K 24. Okt 11:52 7-Segment_LED_Displayd22c0185380ca887apcb77ee801ad8ce635bcd83868e9588bc77.svg -rw-r--r-- 1 tg tg 6,3K 24. Okt 11:36 7-Segment_LED_Displayd22c0185380ca887apcb89d5a9b883a6500795ceedc09bc666c0.svg -rw-r--r-- 1 tg tg 5,9K 24. Okt 11:50 7-Segment_LED_Displayd22c0185380ca887apcbd41ea780e66a4679fb37b449647bbb23.svg

Fritzing/parts/svg/user/schematic: insgesamt 32K -rw-r--r-- 1 tg tg 6,4K 24. Okt 11:36 7-Segment_LED_Displayd22c0185380ca887aschematic0e77057e8ad357c05f71c9bb5bed316e.svg -rw-r--r-- 1 tg tg 6,4K 24. Okt 11:36 7-Segment_LED_Displayd22c0185380ca887aschematic48e14ac1fd74a527366f98feee6f33f6.svg -rw-r--r-- 1 tg tg 5,5K 24. Okt 11:50 7-Segment_LED_Displayd22c0185380ca887aschematic7ccbdcbea5ea1b07bcd754903139dd23.svg -rw-r--r-- 1 tg tg 5,7K 24. Okt 11:52 7-Segment_LED_Displayd22c0185380ca887aschematice6529239badb0e4c2bc1542034ed2d33.svg

Fritzing/parts/user: insgesamt 12K -rw-r--r-- 1 tg tg 8,7K 24. Okt 11:52 7-Segment LED Display__d22c0185380ca887ab512de85218d4a5.fzp

with this files fritzing starts without any message.

surfhai 8 years, 12 months ago

the forum didn't like my input, so here is my original

Jonathan Cohen 8 years, 12 months ago

Thanks for that feedback.  I think we might finally be getting someplace.  

Try this:

  • clear out your ~/.config folder again
  • import your fzpz as before
  • edit it from the parts bin as before (i.e. make some change you'll remember), but instead of closing the parts editor using the close button, use the "save as new part" button at the bottom left.  Fritzing should not ask to restart in this case.
  • When the parts editor window is closed, look at the "mine" parts bin.  You should now see two 7-Segment display parts side-by-side: the one you originally imported, and the new one you've now saved (the new one is the one that's selected).  The new one should have the changes you made, if you open it up in the parts editor.
  • Now in the editor, make some changes to the new 7-Segment part.  The save button should be enabled.  Try to save this second set of changes using the Save button.  I think Fritzing will ask to restart.  
I'm hoping that:

  • after you edit the imported part, you will see the first set of changes in a new part
  • that if you got that far and were able to edit the new part, that the new part got the second set of changes when you saved it using the save button.
If first edit worked but not the second edit, at least there's a workaround, which is to keep using the "save as new part" button.

Let me know what happens.

In any case, there definitely is a bug in Fritzing when you use the close button to close the parts editor, in that it always invokes "save" when it should be invoking "save as".  But weirdly, on the platforms I've been testing this on, when editing the imported part, even when using the close button instead of the save as new part button, the changes still show up.

- j

surfhai 8 years, 12 months ago

That is what I have done before, and the changes are saved... but the main problem was that the connections are displaced after saving. This happens with this workflow too. The connections are always moving a little bit up and a little bit to the left.

surfhai 8 years, 12 months ago

I want this part, now :) Is someone else able to get this part working correctly? Here is all you need t

Jonathan Cohen 8 years, 12 months ago

I have a version of the part with many of the connectors in the right place.  Send an email tp info (at) fritzing (dot) org and I will reply with the fzpz. I will be curious whether the connectors displace again when you import it.

- j