Levels from Excel
This tutorial explores how you can translate levels from Rhino to Revit via Excel. While this maybe overkill for smaller projects, it may prove to be useful for high rise towers which were originally conceived within Grasshopper.
The first step is to generate a series of level names and elevations within Rhino/Grasshopper. The example below uses a series component to generate the number of levels in the project. This is then multiplied by the typical floor-to-floor height to get the elevations. If you’re building has atypical floor-to-floor heights, simply extract the Z coordinates of the defining geometry which represents the levels. Next, we’ll use the concatenate component to name the levels. Both the elevations (number) and level names (string) can then be flattened and fed into the Lunchbox ‘ExcelWrite’ component.
Depending on which ExcelWrite Component you use, you will need to modify the definition. If you use the legacy component you’ll need to ensure Excel is open first before activating the Boolean button (or toggle). Using this method you can set the WriteHeading input to ‘False’ and the RowStart to ‘0’.
If you use the new ExcelWrite component you’ll likely need to use the Path Mapper component to change the data structure as shown below. The new component doesn’t require Excel to be open before activating the Boolean button (or toggle) but you will need to define the file path. This component will always export headings.
Both options should create an Excel file which looks something like this. The only difference will be whether the headings are exported or not.
Finally, we’ll use Dynamo to read the excel spreadsheet using the ‘Level.FromExcel’ node found in the Parametric Monkey Dynamo Package. Simply wire up a File Path node, and two input nodes which represent the column numbers to read for the level name and elevation values. Remember that like most scripting software, Dynamo starts counting from 0, not 1. So column A (level name) is 0, while column B (elevation) is 1.
Ideally you just want to run the Dynamo script once. If you run it multiple times, Dynamo won’t modify the existing levels but will actually create new levels which will be problematic.