Area Table creation in Dynamo


Been playing with a graph to see if a table such as the one attached can be recreated in Dynamo.

No such luck so far, so I am wondering on how hard would it be to get it to work in Dynamo.

One of the problems is that when grouping the rooms by level, if the room only exists, say, on Level 2, that area is listed at index 0, along with all the other areas on Level 1, which are also listed at index 0. This results in that when writing the the excel, the area on Level 2 shows on the same column as the areas on Level 1.

Thank you
JRoom Areas by Level_01_v2 JA.dyn (29.9 KB)

Could you post a screenshot of what is your goal in excel?

Is this what you want ?

Room Areas by Level_01_v3.dyn (10.9 KB)

@Alban_de_Chasteigner. Thank you for your graph but it is not what I am looking for.

In this snapshot I explain what is happening, and what I am trying to get. I am almost there expect for the fact that I need the Level 2B area to show on the correct column. I cannot figure out how to fix it. Maybe adding nulls whenever there are no areas for a particular Group by Key? But the node does not work that way, right?

Interesting problem.
I generally try to keep my List lengths the same when writing to excel.

My approach would be:

  1. Group by room name
  2. Test for level 0, if true, List values, else “” or 0
  3. create List
  4. Repeat and feed list for each level

This could work for projects with a low level count. High rises would need a more elegant solution.

You could use 2 list.transpose to equalize your list and a list.sort node to to order your sublists.


Room Areas by Level_01_v4.dyn (34.2 KB)

1 Like

What kind of black voodoo magic is this?!?

It looks like to be of the good kind :slight_smile:

Can’t get the voodoo to work on mine.
@Alban_de_Chasteigner, you posted a finished XLS solution.
I assume you are not getting the same yellow warnings as I am.
Any ideas why?

Oh it’s really sad because the first item in your list under SortNatural is a null. It’s well known that it makes all nodes fail after…

You can add a List.Reverse or a List.Shuffle after list.transpose and before SortNatural to not have a null in first position.

but…could it not shuffle, or reverse, it in a way that I can get a null as the first item too?

Just try it and see what happens.
I think you have nothing to lose. :grinning:

You could also use the ‘replace by condition’ node and replace nulls with a 0 or “” depending on which data type you need to send through the nodes. Just connect an is.null node to the function of the ‘replace by condition’ node. Do not feed anything to the is.null node. That’s not how this particular node works.

Thank this guy

The 0 could also be replaced with a “” or a " " at the end before feeding to excel…maybe…

I thought about it but it doesn’t work.
There is always the error :
Warning: Internal error, please report: Dereferencing a non-pointer.

The first item in the list must be a room.

EDIT : You can add a random room in first position and use Dropitem after the getparameter nodes to delete it.
So there will be no more null in first position

Ok. What about a replacing the condition with a room using an is null boolean and replacing with an “if” node using the same Boolean mask after the information has been pulled?