petz Posted February 1, 2008 Share Posted February 1, 2008 hi there, i have a little problem here and hope someone can help me. i have used the partition sop for grouping prims depending on $TZ. so i got 68 groups like prim_0_188833. for later use i need groups like prim_0, prim_1.....in acending order. i have tried to use some expression like prim_`int(fit($BBZ, 0, 1, 0, 67))`, but it did not work by reason of rounding. i Quote Link to comment Share on other sites More sharing options...
aracid Posted February 1, 2008 Share Posted February 1, 2008 Hey Petz take a look at this example file, I used the foreach sop to rename each group, using a group SOP. The key expressions are prim/pointgrouplist : this returns garbage the list generated from the partition based off color. arg : this is used to extract a particular string out of a list. stamp : to extract the FORVALUE when inside the foreach sop. What I did : within the foreach sop: I use the primgrouplist to return the groups in the partition sop. ie color_9 color_6 color_4 color_5 bla bla. u can test that with a font sop, just too see what u get. then i wrap that within an arg expression, which returns any string within the list. ie if u give arg this string ("color_9 color_6 color_4 color_5",1) it returns color_6. So I ask for arg(FORVALUE) of all the groups that are within the partition sop. Then I rename that group with the same number i use to index the arg, I hope this helps But its actually really simple. renameGroup.hipnc Quote Link to comment Share on other sites More sharing options...
petz Posted February 1, 2008 Author Share Posted February 1, 2008 thank 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.