Conor.la Posted December 28, 2021 Share Posted December 28, 2021 Hi, OK my scene is roughly a PDG setup with some work items, those have all been merged together into a single work item where all the attributes are merged into arrays. I am looking to access those attributes using component syntax ( @pdgoutput.1 or @pdgoutput.2 ). This works when I manually type in the component pull. I cannot get this to work in a For Number loop using the iter count. How can I build an expression that uses the string of the first part of the attribute ( "@pdgoutput." ) and concatenates it together with an detail interger in a SOP loop like @iteration? I have tried such expressions @pdgoutput.`detail("/obj/geo/merge1","iteration",0)` or even strcat("@pdgoutput.",`detail("/obj/geo/merge1","iteration",0)`) Though these all resolve to 0 I have thought to also try something like atof() though that wasn't working for me either. Does anyone know how to work up pdg array attributes in an expression like this? Is there a better way to do this? Quote Link to comment Share on other sites More sharing options...
mestela Posted December 28, 2021 Share Posted December 28, 2021 This seemed to work; I had a tops @foo attribute array with 1,2,3,4, and in a for loop i could accees it and get the index with evals("@foo."+detail(-1,'iteration',0)) Where the metadata node was wired in as a spare input. Quote Link to comment Share on other sites More sharing options...
Conor.la Posted December 28, 2021 Author Share Posted December 28, 2021 20 hours ago, mestela said: This seemed to work; I had a tops @foo attribute array with 1,2,3,4, and in a for loop i could accees it and get the index with evals("@foo."+detail(-1,'iteration',0)) Where the metadata node was wired in as a spare input. This worked! Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.