Renaming rooms based on area size: Help!


#1

 

 

 

Hey. I’ve got a small problem and I’m fairly new to Dynamo. I want to create a script, that names rooms based on their area. I’ve made a script (see picture below) where I first select the levels, then the rooms and then I sort the “areas” associated with the rooms, so I only display my the area parameters with an area between 10 and 11 m2. But know I don’t know how to convert these areas into elements again in order to use the “SetParameterByName” code block and rename the rooms.

Please help me.

/Christofffer


#2

Christoffer,

The problem is that you are feeding a list of area values (numbers) to Element.SetParameterByName. You need to feed it with the Room elements that match your criteria. Probably by using a List.FilterByBooleanMask something like this:

Cheers,

David