ForEach Loop[Solved]
6175 2 1- ditsikts
- Member
- 3 posts
- Joined: 10月 2016
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: 3月 2012
- Offline
There are a couple ways, depending on what you'd like to do.
If you're doing some operation for each point, you can press the Create Meta Import Node button on the Block Begin node to create another Block Begin node with Method set to Fetch Metadata and Block Path set the same as the other Block Begin node. If you're just doing a For Loop with Iteration Method set to By Count and Gather Method set to Merge Each Iteration, you can just set the Block Begin node to Fetch Metadata directly.
That metadata node's geometry will have two detail integer attributes,
If you're going over a set of points, another alternative is to add a point attribute ahead of time in an Attribute Wrangle:
Hopefully some of those ideas help out!
If you're doing some operation for each point, you can press the Create Meta Import Node button on the Block Begin node to create another Block Begin node with Method set to Fetch Metadata and Block Path set the same as the other Block Begin node. If you're just doing a For Loop with Iteration Method set to By Count and Gather Method set to Merge Each Iteration, you can just set the Block Begin node to Fetch Metadata directly.
That metadata node's geometry will have two detail integer attributes,
iteration
and numiterations
, with iteration
being updated each loop, starting from 0, which I think matches $CY
. In the Iteration Method set to By Count case, there will also be value
and ivalue
detail attributes. I suspect that they correspond with the values implied by Start Value, Increment, and the current iteration number, (i.e. value = (Start Value) + Increment*iteration
), but I haven't double-checked.If you're going over a set of points, another alternative is to add a point attribute ahead of time in an Attribute Wrangle:
i@pt = @ptnum;
Hopefully some of those ideas help out!
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- ditsikts
- Member
- 3 posts
- Joined: 10月 2016
- Offline
-
- Quick Links