tag:support.nodebox.net,2012-11-01:/discussions/nodebox-2-3/6130-problems-with-importing-svgs-on-windowsNodeBox: Discussion 2019-05-02T16:56:19Ztag:support.nodebox.net,2012-11-01:Comment/472282652019-05-02T12:16:48Z2019-05-02T12:16:50ZProblems with importing svg's on windows<div><p>If the path does get read correctly, which I managed by deleting everything but the names of the svg files in the text file, there appear some other errors.</p></div>Tim Würztag:support.nodebox.net,2012-11-01:Comment/472282652019-05-02T16:56:18Z2019-05-02T16:56:18ZProblems with importing svg's on windows<div><p>Tim,</p>
<p>It sounds like you want to do some kind of batch operation using multiple SVGs and have run into two entirely different problems: passing valid SVG file paths and actually reading the SVG files.</p>
<p>I gather you managed to solve the first problem by editing your text file so it contains only clear path names. If you continue to have problems in this area, an alternative is to use a custom node I posted some time ago that can read in the contents of a subdirectory and feed those paths into an SVG node. That way you don't need to type file paths into a text file; you can just put all your SVGs in a folder and point the custom node at that folder. Since it is a custom node (written in Python) you need to add the list_dir.py file to your NodeBox code library. Details here:</p>
<p><a href="http://support.nodebox.net/discussions/show-your-work/236-directory-nodes">http://support.nodebox.net/discussions/show-your-work/236-directory...</a></p>
<p>It's hard for me to know exactly what is causing your second error without seeing the SVG file in question. But I have experienced similar problems in the past dealing with SVG files. NodeBox uses an old SVG library that will throw errors unless the SVG is written in just the right way.</p>
<p>My solution to this is to run SVGs files through Sketch. Sketch can read any SVG you throw at it and export it back out in a format NodeBox can accept. Unfortunately for you, Sketch is only available on the Mac. I have heard of a free PC equivalent called Lunacy which might do the same thing, but have never tried it. Information here:</p>
<p><a href="https://uxplanet.org/the-long-awaited-sketch-for-windows-comes-from-an-indie-team-2fc94309399c">https://uxplanet.org/the-long-awaited-sketch-for-windows-comes-from...</a></p>
<p>If that doesn't help, and if you are able to share one of your SVGs, reply and attach it; I can have a look at it and see if I can find a way to read it.</p>
<p>Good luck!</p>
<p>John</p></div>john