Jump to content

TOPS/PDG array attributes in expressions


Conor.la

Recommended Posts

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...