anicg Posted January 4, 2023 Share Posted January 4, 2023 I've tried: if(find(s@name,"rock")==1) @group_rock=1; but the number of primitives in the groups is 0, while there are a lot. Basically there are a lot of primitives, some have the word "rock" in the @name attribute, others don't I just need to isolate the ones with "rock" in the name. Should I be using a different function? Quote Link to comment Share on other sites More sharing options...
uakin Posted January 4, 2023 Share Posted January 4, 2023 try this code: if(match("*rock*",s@name)) @group_rock=1; Quote Link to comment Share on other sites More sharing options...
jkunz07 Posted January 5, 2023 Share Posted January 5, 2023 It's also possible to use ~= for string matching. @group_rock = s@name ~= "*rock*"; in your case should work as well. 1 Quote Link to comment Share on other sites More sharing options...
eikonoklastes Posted January 10, 2023 Share Posted January 10, 2023 (edited) You can also just use a Group SOP, and set the Base Group to @name=*rock* Edited January 10, 2023 by eikonoklastes 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.