Jump to content

[SOLVED] access iteration in other node with VEX


jmhannu

Recommended Posts

Hi all,

I have a for loop with feedback inside a for loop with feedback, I'll include a picture of my subnetwork so you can get an idea. The problem is that I need to use the current number of iteration from the outside for loop (the loop which starts with repeat_begin1 and ends with end1) in my attribute wrange. I created the "repeat_begin_attributes", which should fetch metadata and has iterations as an attribute. My idea was that I should be able to read that with the detail() function but can't get it to work. I tried this in the attribute wrange: 

int iteration = detail("../repeat_begin_attributes/", "iteration", 0);

This only returns 0 atm so I'm not sure if it's a problem of syntax or just a bad idea. So do anyone knows why this isn't working or have any other idea how I can access the current iteration? 

subnet.jpg

Edited by jmhannu
SOLVED
Link to comment
Share on other sites

Thanks!! This worked: 

int iteration = detail("op:/obj/geo1/Layered_generations/repeat_begin_attributes/", "iteration");

Seems like it need to be in full for some reason, the relative still didn't work

 

:) 

Edited by jmhannu
  • Like 1
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...