Excel Data into Revit

Hi All,

I’m wondering if there is a way to import data from excel and store it “somewhere” in the Revit project, to use the information in every script that will run in the file.

I know that there are several apps to do this, but I’m wondering in what type of object is the storage container, a schedule? a drafting view?

found this on the Autodesk Forum, but not quite I was looking for:
https://forums.autodesk.com/t5/revit-api-forum/importing-excel-into-revit-schedules/m-p/7373986#M25134

I’m looking for something like a DataBase, so I don’t need to read the excel file every time I run the script.

Hope someone has done something with this or if some can orient me in the right direction.

Thanks in advance!

1 Like

Usually all those plugins rely on Extensible Storage as @Marcel_Rijsmus pointed out, which although powerful requires hard coding in order to be used.

As your question is about “store it somewhere in the Revit project” I will avoid suggesting saving your data on any text file or external database like MongoDB or SQL (for which there are quite a few topics on the forum).

One workflow I found useful is by using Global Parameters. For example, you can have a Global parameter of type Multitext and save data on it. On the example below, I am saving a json formated text into the custom dataStorage parameter from a web request to London’s air quality dataset (on csv format).

Once it is set, that data can be retrieved or updated at any time from a different graph.

A few notes:

  1. The format saved on the global parameter can be any, I just prefer json for its simplicity.
  2. The origin of the data can be also any, I simply chose CSV as it can be request via web an avoid an extra file on the dataset.
  3. Although Global Parameters can still be modified by any user, it is unlikely that it might happen “by accident” when working on the model.
  4. JsonData is the package used to create and handle the data in a json-like format.

Please find the example dataset attached. Hope it helps! :slight_smile:

01_dataToGlobalParameter.dyn (6.8 KB)
02_dataFromGlobalParameter.dyn (6.6 KB)
dataOnGlobalParameter.rvt (1.4 MB) (Revit file not required as long as you create a global parameter of Multitext type on your model)

2 Likes

There is also a key schedule.

I’ve used a family in the past for stuff like this. Void of geometry and chock full of parameters which you can call and store and create anew… don’t even have to place it but you might want to so that it doesn’t get purged accidentally. If you post an example of the xls data we can all take turns showings our preferred method.

3 Likes

Hi @jacob.small and @alvpickmans, thanks a lot for both recommendations! @alvpickmans, I didn’t know about the storage in the global parameter to put some data in a JSON format. Thanks for that.

@jacob.small, here is an example of the data I want to transfer to the storage:

Data.xlsx (46.8 KB)

Thanks in advance!

@Jorge_Villarroel thanks for sharing the data.

The files I shared on my previous post are still valid with a few changes:

  1. On the excel file, I created a new sheet with the data re-formatted by having the first row as headers and the rest the data, without any graphic format or empty rows/columns.

  2. Change the source of the data to be the excel file.

  3. On the second dyn file, after reading and parsing the value from the global parameter, I put 2 examples where the data is used ( filter by pier number and sort them by level)

From your excel, I omitted columns for “DM” and “@” values for simplicity.

Cheers!
Data.xlsx (132.5 KB)
01_excelDataToGlobalParameter.dyn (11.1 KB)
02_excelDataFromGlobalParameter.dyn (12.6 KB)

5 Likes

Thanks a lot @alvpickmans I’m definetly including this procedure in my process!