Hello,
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:
f@attr1 = 5.0;
string attrString = "attr1";
f@attr2 = vertex(0,attrString,@vtxnum);
Any suggestions on how to get this to evaluate?
Accessing attributes from a string
2542 4 1- deastman
- Member
- 4 posts
- Joined: 5月 2020
- Offline
- Hans Palacios
- Member
- 57 posts
- Joined: 7月 2018
- Offline
- deastman
- Member
- 4 posts
- Joined: 5月 2020
- Offline
- jsmack
- Member
- 8043 posts
- Joined: 9月 2011
- Offline
- deastman
- Member
- 4 posts
- Joined: 5月 2020
- Offline
-
- Quick Links