Revit Room Data Sheets, Duplicate Excel Sheet and write excel to specific cells

revit
excel
python

#1

Hello all, I am new to dynamo and visual programming, and I was hoping I can get a hand from someone on the forum.

OVERVIEW
I am trying to get my script to produce a Room Data Sheet per room in Excel, so that’s a separate excel file or excel worksheet for each room. so at the end of it, I want to be able to mass produce a room data sheet for each of the 300 rooms in our building with a set of excel files that all look the same.

Now I might have approached this all wrong!, but the script is currently able to produce worksheets in an excel document based on the room number, it can then populate a row of cells in the respective worksheet.

THE PROBLEM
The issue… is that I want it to be able to populate cells down a column vertically, and I want it to copy a company template and use the same template for each room.

THE GRAPH

PYTHON NODE CLEANING INCOMING DATA

PYTHON NODE REMOVING UNWANTED DATA WITH EMPTY PARAMETERS

PYTHON NODE CLEANING DATA FOR WORKSHEET NAME

THIS IS THE EXCEL DOC PRODUCED
As you can see the data is written horizontally, and the room number is used to produce multiple worksheets in the excel doc. to reiterate the issue… I want it to populate cells down a column vertically, and I want it to copy a company template and use the same template for each room.

DESIRED TEMPLATE
As you can see the template is on a tab called “Sheet2” and the sheet format has not been copied to other sheets.

Any ideas or suggestions would be greatly appreciated…THANKS IN ADVANCE!!!


Room Data Sheets
#2

Hi!
I can’t really get into the specifics of what you’re doing here, but I have a suggestion. you can use a template excel file with dummy data. For example the tab you want to populate with the floor finish information could be named something like ##FloorFinish## and then you can use python to substitute this with the actual data.


#3

Hi Viktor
Thanks for the response.
The script basically prints room data sheets from a given model.
It produces a sheet per room.
The problem was the orientation of the data as its printed to the excel file. I was not able to get the text to print down a column vertically.
The other part of the problem was more about formatting the data, so that all data sheets look the same.
I have managed to resolve the data orientation issue. See below…

VERTICALLY PRINTED ROOM DATA SHEET

as opposed to the horizontal output…

I’m using the Bumblebee tools for excel formatting, but I cant seem to get it to work!, can anyone offer any suggestions as to where I’m going wrong? see my set up below.


#4

Have you tried List.Transpose before inputting data in the Excel.WriteToFile node?


#5

Hi @VEZ

I did similar thing just recently.
No python filters, just bumblebee.

First i failed miserably trying to format the sheet myself with bumblebee, but then I tried filling in the “Dummy” - an excel workbook and a worksheet in it.
You can multiply sheets and rename them using VBA script on manually.

In dynamo you can extract data by parameter from rooms, with a separate nodes extracting each wanted parameter. You can push each parameter value into the same cell to all specified worksheets.
You can specify worksheet name by aligning worksheet name with some of the rooms parameters such as “Name” or “Number” wire all into bumblebee’s write to file with “Number” parameter linked into “sheet” input.
In the bumblebee node you can specify cell, just copy it the amount of times you counted from the parameters and plug that list into bumblebee.

Just make sure the parameter value list is a list in a list, so bumblebee pushes the data into separate worksheets, if it is simply a list it will line all values into single worksheet. Transpose each list before plugging into write node

Good luck!


#6

A post was split to a new topic: Room Data Sheet