Jump to content

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
Link to comment
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

Link to comment
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?

 

Link to comment
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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...