kev2 36 Posted October 15, 2016 (edited) Hi, If I use an attribute wrangle to create an array attribute and populate the array like so: i[]@stuff = nearpoints (0, @ape, 1, 23); I can then slice the array like so: i@branch = @stuff[3]; and all is good in the world. However, if I attach another wrangle node and try to use the same slice, I get an error even though the array attribute shows up in the spreadsheet? Not a showstopper but I'd love to know why the attribute isn't accessible. Edited October 16, 2016 by kev2 Share this post Link to post Share on other sites
bonsak 52 Posted October 15, 2016 I don't know why that doesn't work, but this seems to work: i@the_slice = i[]@opinput0_stuff[3]; -b 1 Share this post Link to post Share on other sites
kev2 36 Posted October 15, 2016 Oh, nice trick Bonsak. Works for me too. I'll give this post a couple days and submit it to support if no one can explain it. Maybe its not supposed to for some reason. Share this post Link to post Share on other sites
kev2 36 Posted October 15, 2016 And, i@the-slice = i[]@stuff[3]; also works so it appears to need the [] prefix for the vex snippet to pick up an array attribute. Share this post Link to post Share on other sites
bonsak 52 Posted October 15, 2016 Good to know. Less typing -b Share this post Link to post Share on other sites
dchow1992 28 Posted October 15, 2016 if you don't declare the attribute type the first time you call it it defaults to float 1 Share this post Link to post Share on other sites
kev2 36 Posted October 16, 2016 (edited) For completeness, all I needed to do was declare the array as itself: i[]@stuff = i[]stuff; and then it picks up the array so that i@branch = @stuff[4] works fine now. Thanks @david for the assist. Edited October 16, 2016 by kev2 Share this post Link to post Share on other sites