Jump to content
PixelNinja

Foreach Block vs Subnet giving different results

Recommended Posts

This has been driving me insane for the last half an hour so I thought I'd see if anyone here has any insights.

I've made two near identical setups. One in a foreach subnet (working correctly) and on in a foreach block (not working correctly).

I've attached a simplified setup to demonstrate the problem.

I suspect it has something to do with the "merge each iteration" option. Which seems to work slightly differently on the blocks. It's like it's not feeding the results back into the next iteration correctly.

Any ideas?

 

There's no real reason that I can't use a subnet, I'm just intrigued as to why the results are so different. I'm sure it's just me doing something wrong.

 

Capture.PNG

FOREACH_Loop_vs_Subnet_01.hiplc

Edited by PixelNinja

Share this post


Link to post
Share on other sites

Set the 'foreach_begin1' to Fetch Feedback. Also you have a stamp expression in 'randPoint1' which wont work. It doesn't make it look exactly the same but atleast its working.

  • Like 1

Share this post


Link to post
Share on other sites

Ah, that stamp was a holdover from copying stuff around. It's meant to be a detail() function.

The "fetch feedback" also doesn't work for me. I still get basically the same result.

 

What result were you getting?

Capture.PNG

Share this post


Link to post
Share on other sites

Are you sure? Thats the only two things I changed. It looked more like the green one but not identical. You might need to press "reset cached pass" or whatever its called on the end block. 

Share this post


Link to post
Share on other sites

That's weird. "Reset cached pass" did nothing.

I changed the expression back to:

`rint(rand(detail("../foreach_begin1_metadata1/","iteration",0))*npoints(0))`

and set the foreach to "fetch feedback".

 

I'm on version 16.0.557. Which version are you on?

 

Share this post


Link to post
Share on other sites

Ah I'm an idiot.

It was the "fetch feedback"!

For some reason I thought you meant the "Gather Method" on the end block, not the "Method" on the begin block. Sorry, I must have skimmed your response too quickly.

Thanks for that!

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×