Create Sublists/Shift Indices?

The entire script extrudes the outside curve of a room object upwards by the Parameter of ‘Unbound Height’ creating surfaces.

I was wanting to just take the area of those surfaces and output the data as ‘wall area’.

Having a look at your suggestion now.

Each room extrusion has multiple walls in it though, ranging from 4 - 68 walls. So when I create a list of the rooms, the first indice indicates the rooms, while the sublist indicates each wall’s area in that room.

 

I’ve managed to get it working! I just had to add back in the LunchBox Remove Null values sphere further up the line. Going to see if I can get the entire thing working now :slight_smile:

So I have my final List.Join node outputting everything that I want. I had to drop the final item off a list previously with .list.lastitem input as the “condition” into a List.Filter node as everything broken when I tried to filter by “Object.IsNull” … which maybe points to a larger underlying issue?

My final output pre-Excel write is, to my knowledge, correct now.

I have a list 0-114. List 0 = Room Names, Lists 1-114 = The areas of those rooms. All room areas have input values of up 68. Some are 4x real figures at 64 Empty Elements.

The Excel.WriteToFile node still fails to output based off this data so I’m wondering where I went wrong. I might try to rebuild the entire workflow.

Okay, so you have 114 rooms with up to 68 individual wall areas.

Seems to me your list should have the following structure:

[0] Room001, WallArea01forRoom001, WallArea02forRoom001, …, WallArea68forRoom001

[1] Room002, WallArea01forRoom002, WallArea02forRoom002, …, WallArea68forRoom002

[113] Room114, WallArea01forRoom114, WallArea02forRoom114, …, WallArea68forRoom114

Or alternatively, you could make your life a lot easier and just export a flat list:

[0] Room001, WallArea01forRoom001

[1] Room001, WallArea02forRoom001

[2] Room002, WallArea01forRoom001

[0] Room114, WallArea01forRoom024

And then use a Pivot table in Excel to sift through the data.

 

Does that make sense?

That does make sense Andreas, I’ll have a little play around with that. Cheers.

Ok I’ve got everything working now how I want it except one final hurdle.

For some reason (Probably because it’s not place / broken in the model), one of my rooms returns a ‘null’ value. Given that this will happen from time to time I want a robust workflow within the Dynamo script. I’ve tried using the “Lunchbox Remove Null Values” node and it takes my list of 115 items (0-114) with item 114 being ‘null’ and strips out the null value but gives me now a list of 824 items (0-823). I’m unsure why but the image below should illustrate this.

As such, I was wondering if there was another way to achieve the stripping of null values. I’ve tried playing around with list.Filter, list.filterByBoolMask, List.ReplaceByCondition and various others to no avail so far.

Anyone able to help me out please? :slight_smile:

Dynamo_Remove_Null_Values_Node

What exactly are the reasons none of the recommended filtering methods worked out for you? Maybe we can give you some recommendations on how to alleviate the issue. I find that “ReplaceByCondition” works really well with nested lists in the latest daily build, minus the error.2015-02-11_165048

Ah cool thank you Dimitar.

It was probably the fact I’m still learning the syntax of how to use nodes (So probably got it wrong) rather than the nodes themselves not actually being able to achieve my desired outcome!

And I have the desired result! Thanks so much to all of you for your patience, kind words, advice and encouragement.

It pulls rooms from a model, extrudes up their height based off the parameter of ‘Unbounded Height’, gets the areas of the resultant surfaces, fills in empty field values to create a list and then populates an excel spreadsheet with the room name, each wall area and the number of walls with a simply title at the top.

On cloud nine right now! Something useful I’ve (finally) managed to get working in Dynamo. Totally coming around to the intricacies of how it works now. Big mountain to climb mind you, but getting there one step at a time.

Below is the final Definition. Happy days.
Dynamo_Room_Extrusion_Win3