Get Types by condition

Hello Dynamo Friends,

Today is not a good day, it seems like i can´t handle an easy task. I have the feeling that there must be a much better way to do what I want.

I have a List of Floors.
I want to get a specific type (of 3 types) by a condition = floor thickness.
So i want to get a type for every floor.

So I:

  • Get the 3 Types
  • Get Floor Thickness of n floors
  • Check which of the 3 conditions is true
  • Get Indices of true values
  • Create bool List
  • Create List by inserting by index, which I can´t get to work, tried many settings.

So please give me a hint what would be a better way to get this to run :slight_smile:

Hi @gerhard.p ,

I’ve looked at your Dynamo Screenshot and there are some parts which I would definitely do differently :smiley:
What is the end result/ list structure you are looking for? If I know what you are trying to create I am sure I could assist you in that.

1 Like

Hello @Daan, sorry for the late reply!

I made a few mistakes so here is a new start:

I want to combine these lists to get the desired result:

This will then be my indices for getting items from another list.

But how can I do that?

Tried my luck with ReplaceItemAtIndex but that wont work as i want, it creates sublists instead of replacing the items in one list:

Edit:

It works with the corresponding clockwork node :slight_smile:

hello,
here is a clue

Cordially
christian.stan

3 Likes

Oh, wow, that`s beautiful! :smiley:

Nothing like the feeling of replacing 30 nodes by 3 one that do the same work :smiley:

Thank you very much, also for that condition codeblock, I could´nt get all 3 conditions in one, nice work!

I´m ignoring dictionarys for 2 yeas now, but will now read up this topic in the primer :slight_smile:

1 Like

The Dictionary isn’t even needed here :smiley:
Simply add the Families as inputs in the if-statement instead of 1,2 and 3

2 Likes

Hello, thank you, it was a special dedication to Mr. Marcel (he likes dictionaries too :grinning:)

Hey Daan,

thanks for your idea :slight_smile: works fine

1 Like