stephenl Posted July 26, 2011 Share Posted July 26, 2011 (edited) Hi, I am trying to add an attribute within a for loop in vops. I use the expression `strcat("partner_","")` to combine the two strings but this is where my problem comes. For the second string I want to have the current for loop iteration. I created an integer outside of the for loop and add 1 every time it goes through loop. How can I access this value in the for loop? I tried hooking it to a float to vector and refrencing it using ch() but that didn't work. Is there an expression to access the inputs and outputs of vops nodes (the sub-input inside the for loop)? Edited July 26, 2011 by stephenl Quote Link to comment Share on other sites More sharing options...
edward Posted July 26, 2011 Share Posted July 26, 2011 http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=9068&sid=92d6841c2c86ab16b4016965be702685 Quote Link to comment Share on other sites More sharing options...
stephenl Posted July 26, 2011 Author Share Posted July 26, 2011 Thanks for the link, I didn't know that initial value was the current iteration. How can I access the initial value as an attribute name? I can't wire the value to the attribute name input because I need a prefix and it is the wrong data type anyways. I try ch("../initial_i") and initial_f, but they both return zero because the access the set values of the for loop not the iteration, but I know the initial value in the subnet input returns the correct number because i tested it. I might be able to do it by adding a custom parameter to the addattribute and making it able to be connected (seems impossible) or by accessing the subnet input values but like I've said they dont appear in ch() Quote Link to comment Share on other sites More sharing options...
edward Posted July 27, 2011 Share Posted July 27, 2011 Don't use channel expression functions, use vex functions, like sprintf(). 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.