WLVL Posted February 15, 2016 Share Posted February 15, 2016 (edited) Hello everyone, I have several different pop sim, merged in sop. since the pop id starts at zero for each sim, i have multiple points with same id values. i need a unique id. i'd like to create a name attribute based on the "stream group + id". how would i do this with vex? i am missing how to get the name of the group the point belongs to s@name= itoa(@id)+"how do i get my group name here?"; Thank you in advance! PS. one way i did it was to drop an attr create, shift the id value by a big number (i.e. $ID+500000), different for each stream, but this is not very pratical PS. the nameSOP does get the group name somehow but it's not possibile to unlock its content to see how Edited February 15, 2016 by WLVL Quote Link to comment Share on other sites More sharing options...
WLVL Posted February 15, 2016 Author Share Posted February 15, 2016 Ok i just answered myself drop a nameSOP, name from group drop a att wrangle s@name= s@name_grp+"_"+itoa(@id); done. I am still interested in the VEX function that would replace that nameSOP, thanks! Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 15, 2016 Share Posted February 15, 2016 As the first step: string pointgroups[] = detailintrinsic(0, "pointgroups"); s@name = pointgroups[0] + "_" + itoa(@id); It will take first point's group in alphabetical order. Name SOP chooses group differently, probably the last group in the order they was created. It's probably impossible to recreate such behavior inside VEX and completely replace Name SOP in such corner cases. 1 Quote Link to comment Share on other sites More sharing options...
WLVL Posted February 16, 2016 Author Share Posted February 16, 2016 thank you very much!! 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.