noc2 Posted August 2 Share Posted August 2 Hi; I have a point wrangle set to run on a set number of arbitrary points (say; 12 22 11 41) What I want to do is to set another incrementally increasing integer that starts from 0 going all the way up to 1-number of points run through (considering the previously mentioned example; 0 1 2 3 for 4 points set in as a group to run over) I can't use a for loop since a for loop runs for each point wrangled I tried using 'int i = 0; i++;' but that didn't work either. How would it be possible to get this done? Thank you AJ 1 Quote Link to comment Share on other sites More sharing options...
forever_kk Posted August 2 Share Posted August 2 use detail wrangle Quote Link to comment Share on other sites More sharing options...
noc2 Posted August 2 Author Share Posted August 2 16 minutes ago, forever_kk said: use detail wrangle Yes, I tried using detail but I couldn't figure out how to write to a point integer array attribute from within detail Quote Link to comment Share on other sites More sharing options...
dleonhardt Posted August 3 Share Posted August 3 (edited) int pts[] = expandpointgroup(0, chs("group")); for(int i = 0; i < len(pts); i++) { setpointattrib(0, "num", pts[i], i); } Here's a simple way to do this in a Detail Wrangle. This will also work with ad-hoc groups. Edited August 3 by dleonhardt 1 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.