Custom node with path error

I can’t insert the path in the custom node
Help Thanks

Hi guess filepath is a string

1 Like

This. Your path needs to be a string. A string node is easiest, but if you use a code block make sure you use a double-slash (\\) to avoid escape characters.

2 Likes

For file path i suggest use string node

2 Likes

yeah me too :wink: becaurse im not sure the double slash trick works for input node or accept the real path without double slash…havent tried

1 Like

Here is the sample

yeah and in a codeblock with db slash as @Nick_Boyts mention

2 Likes

Thanks everyone for the help

I don’t understand what the difference is between this:

Thanks everyone for the help

I don’t understand what the difference is between this:

and this (the path is a string):

but how does one know about the // ?

it’s a bit strange

Thank you

yeah probably, but now you know it :wink:

Strings can contain special characters called escape characters that do a specific function within a full string. Things like line breaks, quotes within quotes, and special formatting can be accomplished with the appropriate escape characters. It’s not a Dynamo thing, it’s common in most languages and just one of those things you become familiar with over time and experience.

Here are some examples in Python, though most will probably work in Dynamo code blocks as well.

1 Like

Thank you
I got it… I had the \ in the path