Setting Parameters by name from one list of objects to another


#1

Hi All

I’m trying to obtain parameters from one list, apply some logic and set some parameters to another list.

Goal: Pick a Room in set A, check if a certain parameter matches the parameters of all Rooms in Set B. if true assign another parameter from Room in Set A to Rooms with matching parameter in set B. Repeat until all Elements in Set A are checked.

So far i have managed to do it one by one but would like to automate so i give a sequence from 0 to 300 and corresponding rooms in Set A are checked against set B and so on.

What is not working is that when i assign a sequence it does not loop but it just checks all element in the given sequence against all elements in Set B.

RC_Set_Area_Loggia to Apartment.dyn (20.9 KB)


#2

Use a crossproduct lacing to in your “String.Contains” Node. Then pay attention to the list structure. Hope it works.


#3

Hi, Thanks for your reply. I solved it through Rythm

The proccess goes like this: First group all room elements sharing a parameter than select the element from which the Area parameter is to be extracted than apply that parameter value to the rest of group.

Not the most elegant solution bu it works.

Kind regards

packages(List.RepeatItemsByLength).


#4

Yea that works but you are creating data you don’t need.Glad you got it to work though.