Jump to content

Referencing a string array item in a File path


Manuloti

Recommended Posts

Hello ODFORCE community! First time around here and I hope you can help me with a rather simple(?) case of referencing an attribute to a node.

 

So my situation is the following:

I'm trying to feed a number of pre-made curves (from Illustrator) into a File node. In order to do so, I thought I could build a string array in an attribute (detail) wrangle, with the paths to the .ai files, and then extract each file path by feeding a chi() to select each array item. So far so good.

 

What I've noticed is that File nodes don't store data. Is that correct? I connected the attrib wrangle and I couldn't see any attributes (I tested on other node in case was a coding mistake, but they worked fine). So... that's when I land in this question of how to import data in the file path of a File node (Geometry File is the name).

 

I attach 3 snapshots. One with the mentioned nodes,a second one with the array (I've only included one file path xD, just testing) and a last one with the error showed in the File node.

 

I tried adding the "`"

 

Quote

`detail("op:../to_feed", "ref_string", 0)`

 

"to_feed" is the attribute wrangle

"ref_string" the attribute

"0" as... I'm retriving the the index = 0 of the array? That one I don't have it clear

 

Anyways, doesn't work : /

Is there a way to make it work? Can I retrieve a non-connected attribute into a File node geo path?

Alternatives?

 

Thanks in advance!

Hou_snap.png

Hou_snap_1.png

Hou_snap_code_piece.png

Link to comment
Share on other sites

Here is the fix:

1. The function to retrieve a string detail value is "details()" and not "detail()", as the one I used

2. Either details()/detail() expect a SOP path, so there's no need for the "op:"

This is thanks to Tomas Slancik from the "other forum", but a shout out to him anyways. I drop the solution here too as I can't delete this post thus far and it'll probably be useful having it here too.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...