Vex: read tuple of ints with detail expression

   1825   3   0
User Avatar
Member
101 posts
Joined: Dec. 2012
Offline
Here is a minimal example.


An attribute wrangle node with the following snippet:

i[]@test = {2, 4, 6, 8}

Now i wan't to access in the blast node that list, so i use the following expression:

detail("../attribwrangle1", "test")

However detail expect's an `index` as the last parameter, so doing

detail("../attribwrangle1", "test", 0)

will return `2`, which is the first element.

Is there a way to return everything as a list/string?
Edited by schiho - Nov. 1, 2018 16:56:08
User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
To keep as close to your workflow.

Instead of creating an array of ints in the detail,

create a string:

s@List = '0 1 2 3 4 5 6';

If instead of manually creating the string, you need to use ints like @ptnum, you can first contstruct a loop using itoa() and append() functions to get it to a string.

Then for the blast node use the following(needs those backticks):

`detailsmap("../PW/", "List", 0)`

Middle mousing the parameter box with the detail function will go between what it evaluates to and the expression itself.

Attachments:
Blast with Detail String.hiplc (71.4 KB)

User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
interesting question, I thought you could do something like this `atof(details(“../mywrangle/”, “mystring”, 0))` but it seems broken.
User Avatar
Member
101 posts
Joined: Dec. 2012
Offline
@BabaJ

Thanks a lot, that's what I was looking for, did it a little different though, as I'm now accessing only a string.

`details(""../attribwrangle1", "test")`
  • Quick Links