I'm trying access the contents of an attribute, using a string to address the attribute. Before anyone suggests using bindings, that isn't an option here and I'll need a way to do it programmatically. In other languages, this is the sort of thing I would do with an eval("@attr1");
I've tried using vertex, attrib, getattrib, and vertexattrib, but none of them work. I know there's something obvious that I'm doing wrong here, but I can't seem to figure it out.
In this simplified test case, I have a polygon box feeding into an attribute wrangle, and the wrangle is running over vertices:
Your simplified test case should work if the f@attr1 = 5.0is first applied to each vertex in its own Vertex Wrangle and then the next Vertex Wrangle can read the attribute using the 2nd and 3rd lines of code just as you've written them.