Add Value from list 1 index 0, to every item in list 2 index 0

I’m trying to write a script that can list all rooms (Name, and Number) and each sheet they appear on (Name and Number). I’ve figured out how to collect the data from the model, but I’m having a hard time exporting the data to excel in a friendly format.

What I would like to see is each instance of a room have it’s own row with the room name, room number, sheet name, and sheet number in separate columns in that row. See Image Below for an example:

The problem I’m having trouble with is applying the sheet name and number to every Room that is displayed on that sheet.

I currently have it setup to export each list as a separate excel doc just we’re short on time but would like to get this working to avoid manually combining the list in excel.

Rooms on Sheet.dyn (128.9 KB)
Thanks for any help!!!

Once you have the Views, you can keep the data together with a bit of Cycle, Chop and Transpose:

The nodes you had where you had a list of parameter names and a list of elements feeding into Element.GetParameterValueByName you need to use cross product lacing to get all of the values.

Rooms on Sheet.dyn (89.4 KB)

Hope this helps,

This is perfect. Thank you so much!! I’m going to dig into it a learn a lot.

1 Like