JJ FX Posted October 3, 2017 Share Posted October 3, 2017 (edited) Hi, So inside for-each-loop in a wrangle i want to set the color, but this does not work, generates zero values: @temp = detail("../foreach_begin1_metadata1", "iteration", 0); @Cd = rand(@temp); Looks like I dont know how to get the iteration detail attrib. tried in different ways but always gets zeros. Edited October 3, 2017 by JJ FX Quote Link to comment Share on other sites More sharing options...
f1480187 Posted October 3, 2017 Share Posted October 3, 2017 (edited) Easiest way is to plug metadata into the wrangle and access it by input number: int i = detail(1, "iteration"); You can also use full node path like "op:/obj/geo1/foreach_begin1_metadata1" (injecting expression: "op:`opfullpath("../foreach_begin1_metadata1")`"). Or use "opinput:1" string or s@OpInput2 (they numerated from 1 there) string variable. Unfortunately, other strings will be treated as file paths. "../foreach_begin1_metadata1" will search for file called "foreach_begin1_metadata1" somewhere in $HIP's parent directory. Edited October 3, 2017 by f1480187 1 Quote Link to comment Share on other sites More sharing options...
JJ FX Posted October 3, 2017 Author Share Posted October 3, 2017 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.