Exporting custom room parameters to excel

I have added a custom parameter to Rooms in my Revit model for “AREA TYPE” and want to export it as a column with other parameters to Excel. Even though I went to several rooms in the project and populated this new parameter with values, my Dynamo definition isn’t producing anything. Any ideas for how to make this work?

Dynamo_Area Type

That get parameter value by name node should be doing it for you. What version are you using?


I just updated the other day to 0.7.5.

I am attempting to extract 4 default room parameters using the LunchBox Room Element Collector (level, name, number, area) and then add the above portion of the definition for custom parameters added to the Rooms. At the Excel.WriteToFile node I am getting a null result with the warning: “Excel.WriteToFile operation failed. Index was outside the bounds of the array.”

note: I changed the parameter name to SPACE TYPE, still not working…

Full Definition

Upon further investigation is seems that everything is working up through the Index but something is breaking at the Excel.WriteToFile node…

excel.writetofile problem

Can you try tying a test string into the data port of your excel.write node? This can help us determine if there’s something with the excel part or the data you’re writing to it.


Yoy could try this:

connect your File Path node to File.FromPath node and then feed that into Excel.WriteToFile node.

I tried running the custom parameter node to the data port by itself and that worked, overwriting the information in the first column of my spreadsheet with all of the corresponding Space Type values (images 1 & 2). I then went back to running the default room parameters from LunchBox and that worked just fine (images 3 & 4). Finally I tried to run them again all together from the same List.Create node and the same error occurs at Excel.WriteToFile (image 5).

Could the problem exist between List.Transpose and the data port of Excel.WriteToFile? Is there a way to merge the two streams after List.Transpose? Also, if you look at the excel output in Image 2, you will see that some of the Space Type cells are blank, could these null values (or lack of values) be causing a problem? I did not get the chance to go through every room in the Revit model and apply a Space Type to every single one, I was hoping to do that after the definition was working properly.

@Marcel, unfortunately inserting File.FromPath between the File Path and Excel.WriteToFile nodes only generated an error.

7_LunchBox + custom_broken

I finally found the problem but could use somebody’s help with a solution…

Because I am attempting to extract the custom parameter Space Type, this portion of the definition is pulling ALL rooms from the model including those that are “unplaced” and “not enclosed”. Therefore the output from List.Transpose contains 621 items however there are only 502 placed rooms, meaning that items 503-621 only list Space Type (see image below). This is what is causing the error in the Excel.WriteToFile node.

Is there a way to specify only placed rooms? (It seems that the LunchBox Room Element Collector node has achieved this)

Or, is there a way to filter out items in the index? (in this case, lines 503-621)

8_unplaced rooms


Andreas, thank you for the response…

When I run the exact same sequence of nodes you used, I get an error at the List.FilterByBoolMask node: “Warning: List.FilterByBoolMask operation failed” (image 1)

Secondly, if/when I get this sequence to successfully filter out unplaced rooms, how/where do I link that back into the rest of the definition to join the rest of the parameters in the Excel export? (image 2)

I really appreciate the help

10_where to connect filter

I dug a little deeper into the filtering of unplaced rooms… It looks like the node Room.IsUnbounded is returning two null values and thus causing an error at List.FilterByBoolMask.

Also, there are two more items coming out of the rooms list (520) than the Room.IsUnbounded node (518), could this be causing a problem (image 1)?

After creating a schedule in Revit, I realized that there is a combination of unplaced, not enclosed, and redundant rooms in the model. Does one of these items cause null values for the Room.IsUnbounded node?

11_boolmaskfilter null values


I finally got this definition to work by removing all unplaced/not enclosed/and redundant rooms via a Revit schedule.

However, I really need to figure out a way to filter these items out to counteract users’ poor Revit modeling practices, if anyone could help me out with some ideas of how I might achieve this, I would really appreciate it.

Another annoying problem has emerged… Even though I can now get the 4 room parameters from the LunchBox Room Element Collector to exports successfully with the same exact number of index items as the custom room parameter, I have discovered that the exported values do not match at all.

Somehow the parameters have become completed dissociated, does anyone know a way to re-establish an identical index order so that the values export correctly?


After making a simple adjustment and re-running the definition, all parameters are now exporting to Excel with the right association. I will call this one solved for now but I would appreciate any suggestions for a way to filter out unplaced rooms in an index in Dynamo…

I am not able to get Flatten Array node its showing Flatten List node. How do i get this Flatten Array node?

New Picture (2)




Have you tried package archi-lab and Get Rooms by Level node? It has a boolean toggle that will exclude unplaced rooms.

Also, Andreas’ node does the job well as you can see above.


Array is very similar to a list. In Dynamo List.Flatten node will work well enough on both.

Thank you,

Thanks Konrad,

But i am getting some errors.

You’re using List.Flatten instead of Flatten. If you use List.Flatten, you need to specify how much to flatten (ex: wire a number 1 from an integer node or a code block). That’s probably what’s causing the error in the image above.


I wanted to try the Get Room Rooms by Level node initially but could not get it to work, see this thread: http://dynamobim.com/forums/topic/get-rooms-by-level-not-working/

Any ideas why I might be experiencing issues?