Problems with importing svg's on windows

Tim Würz's Avatar

Tim Würz

02 May, 2019 12:10 PM

Hello,
I'm not able to import svg's via the path of the file on windows.
I've tried to put them in the same folder, but it doesn't seem to do anything. The textfile with the paths gets imported correctly as well, it just can't seem to find the files it should be loading.

Does anyone have an idea what the error could be?

Thanks, Tim

  1. 1 Posted by Tim Würz on 02 May, 2019 12:16 PM

    Tim Würz's Avatar

    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.

  2. Support Staff 2 Posted by john on 02 May, 2019 04:56 PM

    john's Avatar

    Tim,

    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.

    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:

    http://support.nodebox.net/discussions/show-your-work/236-directory-nodes

    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.

    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:

    https://uxplanet.org/the-long-awaited-sketch-for-windows-comes-from-an-indie-team-2fc94309399c

    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.

    Good luck!

    John

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Unbenannt.PNG 16.5 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

16 Feb, 2025 11:13 AM
15 Feb, 2025 12:51 PM
06 Feb, 2025 01:37 AM
04 Feb, 2025 06:32 AM
04 Feb, 2025 05:04 AM

 

30 Jan, 2025 09:31 AM
30 Jan, 2025 09:08 AM
30 Jan, 2025 08:40 AM
24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM