Create Revit Materials with an Excel Sheet

Creating materials in Revit can be a burden, especially when there are a large number of materials to be created. One example scenario would be the application of required materials according to the BIM execution plan of the project. The current out-of-box method (in current Revit versions at the time of this post) requires a user to create each new material one by one manually. Luckily with Dynamo, this tedious task can be simplified with the help of an Excel sheet reducing hours to minutes.

Dynamo can read information from an Excel sheet and organize the data to create Revit elements. As long as the Excel sheet is correctly formatted Dynamo can process the data correctly.

Don't forget to save the Excel sheet before running the script again.

Download the Excel sheet for an example format that coincides with the Dynamo script to create materials*. You may freely edit the Excel sheet to add more materials by adding more rows of data.

*Note that the Dynamo script can only create new materials. The script CANNOT modify NOR replace existing materials with the same name.

When it comes to materials, Dynamo is currently limited to creating new materials only. Therefore this script is best used at the beginning of a project, or if a project is already in session it can be used to introduce a new set of materials. This is useful for introducing new materials with a prefix or suffix which helps differentiate them from existing materials and set naming standards. Managers can specify only applying the new materials created.

When using the script, below is the suggested workflow:

  1. Download the Dynamo Script (choose the version applicable to you) and Excel file.
  2. Use the provided Excel sheet to add/modify your own desired materials. See more instructions in Excel.
  3. Run the Dynamo script to create the materials. If this is your first time using this script, it is recommended to run this in a new model before running in your active model.
  4. Revise material properties if needed in the following two ways:
    1. If a few materials need modification, open the Material Editor, delete the materials in error one by one, make the changes in Excel, and then run the script again to recreate the deleted materials.
    2. If all the materials need to be recreated, select all newly created materials in the Material Editor and delete them. Make new changes in Excel, then run the script to recreate all materials again.

 

Last updated: June 6, 2020

*Clicking this link will bring you to the download page.

Saved in Dynamo Version:

1.3.2 & 2.0.1

Dynamo Packages Required:

None.

References:

None.


18 Comments

Vince Gervais

Vince Gervais · September 12, 2019 at 8:33 am

I’m so glad I stumbled on this site. The v2.0 script doesn’t seem to be complete. The v1.3.2 is looking at the ‘older’ version of surface and cut patterns before Adsk split them to foreground and background.
Is there a timeline when the v2.0 script might be updated?

ElevateBIM

ElevateBIM · September 14, 2019 at 5:39 pm

Hey Vince. When you first download and open the script for the first time, you may find that other than a blank Excel file popping up, nothing happens. That may simply be that the file path to the provided Excel file needs to be updated on your end. Click the node [File Path] highlighted in blue and navigate to the provided Excel file, then run again. Then go to your Materials and you should see new materials created according to Excel file in the sheet named “ARC”. Try that and let us know if that works for you.

minjung kim

minjung kim · December 3, 2019 at 12:07 am

I have a warning msg on phython component and failed creating new materials. the warning msg goes- “Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last): File “”, line 32, in
Exception: The given value for name is already in use as a material element name.
Parameter name: name”

Anthony Chung

Anthony Chung · December 11, 2019 at 1:15 am

i have the same message as above is there a fix.

Bugra Ozgul

Bugra Ozgul · December 24, 2019 at 5:49 am

hi.
thx for script but i can’t understand how i can create new material name and wall type at excel

ElevateBIM

ElevateBIM · January 9, 2020 at 8:44 pm

New Excel file was uploaded with instructions to simplify the process. Please download all new files to ensure compatibility.

To answer the error posted above “The given value for name is already in use…” This simply means that a material with the name specified in the Excel sheet already exists in the Revit model and therefore cannot override the existing material. If you wish to make modifications, delete the materials with the same name in the Revit Material Editor, and then run the script again. The error may appear again if some materials with the same names specified in the Excel sheet still exist in the Revit model, and this is OK if you wish to keep those materials. Make sure to save the Excel sheet before running the script again.

Ivan · May 28, 2020 at 2:12 pm

When I run the script, it opens only a blank worksheet and does not enter the materials entered in the other worksheet. Does the Excel file need to be in the same folder as the script?

    ElevateBIM

    ElevateBIM · May 31, 2020 at 8:32 pm

    Hi Ivan. When you first download and open the script, you will need to first select where your downloaded Excel file was saved. It does not need to be in the same folder as the script, in fact it can be located anywhere. Though I recommend that you save the script and the Excel file in the same folder. I actually just realized the files on the website were not the latest. I have went through and updated all files. Could you download the Dynamo Script (choose the version applicable to you) and the Excel file again to get the latest. The instructions in the post and Excel file have been updated as well. Let me know if this works for you.

      Ivan Almeida

      Ivan Almeida · June 6, 2020 at 11:03 am

      Perfect, resolved. Just one more doubt: he does not select all the rows of excel, only the first, as if only the command “integer slider – first row in excel” worked. What can it be?

        ElevateBIM

        ElevateBIM · June 6, 2020 at 12:30 pm

        Ivan, I’ve decided to revise the scripts to remove the “List.Slice” nodes making the scripts easier to use. Can you redownload all files, see the new instructions in the Excel file, and let me know if this works for you.

          Ivan Almeida

          Ivan Almeida · June 6, 2020 at 4:07 pm

          I followed all the steps, but it still reads only the first line, not all the lines at once.

          Maria Riera

          Maria Riera · January 29, 2021 at 4:33 am

          Hello there.

          I am having the same problem, it just read the first line, so I just got to create 1 material, is there any solution to this?

          Thank you

Laura Bender

Laura Bender · September 16, 2020 at 10:38 am

I’m new to Dynamo, but was hoping to modify this script to be able to fill out the information on the Identity tab for the material (mainly just the descriptive and annotation information), and to be able to specify the surface & cut patterns (patterns already loaded into the project). Ideally, I’d like to be able to create and apply appearance assets for rendering too, but at that point I almost feel like it would be easier to just do it manually. Or maybe a separate script to create a bunch of appearance assets, then assign them using this script? Thoughts?

Rohit Handa

Rohit Handa · July 13, 2021 at 9:42 am

Hello, I’m getting the following error:
Warning: String.ToNumber operation failed.
Not a valid number.
Parameter name: str

Do you know what might be going on? Also, is there a way to fill in the material description and comments sections with data in my excel file?

Hendrik Smit

Hendrik Smit · December 8, 2021 at 2:03 am

Hello, I get an “invalid download link” when I try to download the files.

    ElevateBIM

    ElevateBIM · December 22, 2021 at 3:48 pm

    Hi there. There was an update to the Download Manager plugin used on this website. I cleared the cache and all links should work now. Feel free to leave a comment if any further issues. Thanks!

Leave a Reply

Avatar placeholder