Very large list from an if statement block

Hey reader,
I am a new learner of dynamo and it seems to work great. I am trying to make an adaptive facade using dynamo. (as a reference i am using a video of RV boost) Link: https://www.youtube.com/watch?v=UQmFmAFoLkU&t=1535s
But when i follow his steps to use an If statement block i get 200.000+ numbers when the input is only 450. Somewhere it is multiplying itself but i dont know where. It is probably a small thing somewhere but i have been looking online and on the forum for 4 hours and i can’t find any help. I have attatched the file and a screenshot. If more is needed you can reach me here or on my email: Stijn.crezee@outlook.com
(I cant upload attachments because i am a new user so i hope this contains everything that is needed)

Thanks a lot for what you guys are doing on this forum.

The true and false inputs hold “equivalent rank”, so when their structures don’t match, Dynamo makes them. The If node is returning the entire false list for every test that reads false. You need to either provide a matching true list or use list levels to indicate that the test and false inputs are meant to be considered one at a time.

If you test this with a smaller list that includes both true and false conditions you’ll see pretty quickly what’s going on.

Try this, but make sure the list.count node is @L1 like so
image

It makes sense for me that it should work but dynamo thinks about it otherwise.
I still have the same issue. the list from the if statement has gone to 4 layers of lists. How can it happen that it creates anotherone. (the original is 2 layers and the new one is 3)

huge thanks for the fast answers

Hmm, i didn’t expect the cycle to add on another list layer.
Its not a nicest solution, but you can probably flatten with a value of 1 to remove the L3 of teh cycled list and see if that works.

I tried it using the list.flatten (i thought i should use this one) it still hasnt resolved the issue. I feel so dumb right now.

hmm. me too.
Maybe try fiddle with the list levels on the IF node, else there is a good chance when Nick gets a chance to reply hes going to know what it is, also if the cycle node is set to longest lacing it might not spit out such a crud list

Yes i will try. Well thank you very much for your feedback.
A small other question is there any way how i as a simple architecture student can help other people here?

You don’t actually need @L1. This is why it’s giving you individual lists for every single item. Just List.Count on its own would give you the total length of the list to cycle.

The If node was updated to use list levels, which makes it much easier to control, but also caused its default functionality to change a little bit. You need to specify the exact level of interaction between each of the lists to get the output you’re looking for.

A simple example highlights what’s happening.
By default, the true and false inputs are being treated as single values (a list). So each instance of true or false returns the entire matching list.

List levels allows you to force each item in each list to be treated independently.

You have one input as a single item (false in my example), which means it already matches the list level you’re looking for.

1 Like

Ah i understand now. You are amazing nick thank you <3

1 Like

Do you need to test for values > 0.495? the Math.RemapRange has already done that for you. You could also check with a List.UniqueItems after the code block to see if any are true.

Great point - I missed that part! You should already have what you need. We already know there were no true values because of the number of results we were initially getting.