"No graphic items found in file" during SVG Import

Trying to upload this SVG into Kicad(V6.0.4) but it’s failing. The message error is “No graphic items found in file”. What’s wrong with it?

template_tikz-01

The drawing generated using a latex/tikz and exported to SVG through dvisvgm. Using Windows 10. It took me some time to figure out this workflow, and now I am afraid it was time wasted if the SVG can’t be uploaded.

Any suggestions?

EDIT: For good measure, I downloaded the figure after uploading and tried again. It worked! I am trying to check the differences between the generated file and the downloaded file with notepad++. The major one is that apostrophes ’ are changed to quotation marks " after the upload/download, but a simple search and replace still didn’t work, so there might be other differences. I would like to upload the original SVG, but I can’t upload .zip as a new user, so I don’t think it’s possible.

EDIT 2: Two solutions found:
a) When using Kicad 6.0.4, the SVG need to be on UNIX (FL) format. You can convert using Notepad++. Open the SVG and go to Edit > EOL Conversion > Unix (FL).
b) Update Kicad. Version 7.0.6 works well without any need for EOL Conversion.

I can import it in KiCad V7 (Except for the numbers in the corners). So if it does not work in V6, that’s probably some bug that won’t get fixed, unless you can find someone kind enough to backport it.

Do you have a good reason for sticking with V6? KiCad V7 is now about half a year old, and though I have not used it much lately, it should be fairly stable.

Also, what is the intention of this graphics? There are several python scripts / side projects for KiCad to generate PCB inductors.

1 Like

Works for me (except the Numbers), V6.0.11

1 Like

Thanks for the quick input paulvdh and BlackCoffee!

No special reason for sticking with V6, it’s just the one I’ve been using. But it doesn’t seem the problem is the Kicad version, but the file itself. I downloaded the file after commenting and it worked, so something changed during the upload/download.

I was trying to look for comparison tools on Notepad++ and I saw an “EOL Conversion” option that I saw someone else post about a year ago. I didn’t try to pursue this solution because I didn’t know it would be so simple…

But yeah, converting to “Unix (FL)” did the trick. I imagine that this conversion happens automatically once a SVG is uploaded here, but from a purely electrical background I am not as savvy with these kinds of stuff.

But yeah, for anyone else trying to look for a solution for the SVG files, just open the SVG with Notepad++ and go to Edit > EOL Conversion > Unix (FL). It does the trick.

I completely skipped looking for external pluggings. Only midway through I though “something like this should exists”, but I was already too deep into using the tools I am comfortable. But I am not super satisfied with the manual EOL conversion, so I will probably first try to update my Kicad and then maybe look into external projects that can do it more seamlessly.

Thanks for the hints and the quick response!

Upgrading to 6.0.11 is worthwhile, a large number of bugs got fixed.
7.0.6 is stable.
In addition to the new features, many bugs in 6.0.11 have been squished and won’t get backported to V6

1 Like

Put both files in a source code comparison program such as Meld Merge.

1 Like

Back to confirm that the SVG import works without any problems (and without any need to do the EOL Conversion) in Kicad 7.0.6.

Thanks to all!

3 Likes

Hey @paulvdh

Asking you directly because I saw you replying to several other posts (now closed) reporting similar problems to what I have.

I am still trying to use my workflow with KiCad V7. I looked into a few of the side projects but they are either limited to my purpose (in numbers of layers/turns/shapes) or they require python, which I am not too familiar. Since this is supposed to be just a quick test, I am trying to stick with the tools I already know.

The issue I have been trying to go around is to connect traces/vias with graphics. Is there a way to bypass the “Cannot start routing from a graphic” message? Any way to convert graphics into traces?

Right now I am using lines (Ctrl+shift+L) in order to connect the graphic to vias and pads, but it is very clear this is not optimal.

Thanks in advance!

Is there a way to bypass the “Cannot start routing from a graphic” message?

Route–>Interactive router settings. Choose “highlight collisions mode” and set checkbox “Allow drc violations”. This allows you to draw tracks onto graphic copper. Be aware that this will produce DRC-errors during drc-check.

Any way to convert graphics into traces?

Select a line–>RMB-click–>context menu–>create from selection–>create tracks from selection. Than you have to assign the desired netname to this new tracks.

You can also Create Zone from Selection.
You can also ‘Unset’ WalkAround in Route>Interactive_Router_Setting.

You need something to connect to so, use a Via or Pad/Terminal/etc…

Perhaps, even better / more useful - I recently upgraded to v7 and reviewed using Graphic/SVG’s

Nice new Graphic capability in v7 so, I made quick Demo of using SVG for a Pad on a Net… Sorry about Low Quality video - there’s a 5meg file size limit…

I used LibreOffice’s Draw to make the SVG’s.

ADDED: No need for a Via/Pad to connect to the Graphic… Just set it to a Net and attach a Track (I did set the Graphic to Solid-Connection type). Also used the included TearDrop tool… Screenshot

Thanks @mf_ibfeew. I was looking for this option for days, but it wouldn’t show up! Thanks to @BlackCoffee 's video, I had the answer: the option will only show up for graphics that are not grouped. If the graphics are imported grouped, the “Add Track From Selection” won’t appear. Any reason why?

I tried @BlackCoffee 's suggestion as well but I couldn’t create a zone. On the pop up window, if I select “Use Centerlines”, the zone is not created. However, if I select “Creating Bounding Hull”, then a zone is created, but it does not fill the area, only the tracks. Anyway, the other method already worked, and I do not need this for this project, I was just curious of why. My current hypothesis is that I created my SVG in a very sub-optimal way that is tracing the circle with lines instead of arcs, and thus a “centerline” cannot be found? Not sure if that makes sense.

Anyway, thanks to everyone for the input!

For anyone stumbling into this topic in the future, beware: when you create tracks from a graphic, it won’t “delete” the graphic. You will have both track and graphics overlapped. Use the selection filter (bottom left) to delete the graphic so you can start routing without DRC violations.

If the graphics are imported grouped, the “Add Track From Selection” won’t appear. Any reason why?

I guess this special case is protection (or simplification) in the source code - as groups can contain different items like footprints (which can’t be used for track-generation) and additionally groups can be nested multiple levels. So implementing the conversion-tool also for groups would be a harder task. If you need that often, than you should open a gitlab feature request.

beware: when you create tracks from a graphic, it won’t “delete” the graphic. You will have both track and graphics overlapped.

That’s true. But directly after the track creation command the original graphics is still selected (to do other things with it). So at this point directly pressing “Delete” removes the graphics, no need to later fiddle with the selection filter.

I understand. No, there’s no need. Just curious.

Works flawlessly! Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.