Create a New Materials from Excel Data

Hi All,

I am starting to use dynamo and I would like to create a materials from a list in Excel and update also the Description and Class. Can anyone help me with this. Thanks in advance.

1 Like

That’s quite a lot to do, although I think very doable.
What I’d advice you to do is to dive into controlling familiy via parameters, unless you’re already pretty skilled with that.
Once you got that down it’s time to write a bit of code in Dynamo to read from excel and write to Revit.
Reading from excel files, manipulating the data and writing to Revit are worth a topic on themselves. To give you an idea what “size” you’re going to be dealing with:


This is the code I’m using to read from excel, manipulate data, set parameter data and create new family types.
I’m thinking the clockwork package might be a necessity for you, that has nodes aimed at creating and altering materials. You might want to focus on getting the hand of using those nodes before starting reading files from excel.

AT the moment only managed to read the excel files and get the data I need but not sure how to write the new material from the list I have. Thanks.

image

Well that’s a good first step.
Do you have the Clockwork package installed?
That’s got a lot of nodes focused on changing materials.

Thanks Paul. Yes I have the clockwork package and got this under materials.
image

You can create new Materials by using the Material.Duplicate node and then give it its properties with the Element.SetMaterialParameterByCategory. If I’m honest I don’t have much experience with creating and changing materials with this, only family types.

1 Like

Thanks PauLtus.

Did you manage to get it working in those 24 days?

Hi Paul,

Sorry for the late response. Yes I manage to get it working. Thanks.

Could you share your solution here? It could help others to solve similar issues.

I’d love to see your solution to this problem as I am trying to accomplish something similar!

@wma_sfenton - best to start a new thread, as since Hassan hasn’t shared his work so far and any solution provided would run the risk of derailing his topic. When you create yours be sure to provide what you’ve trying to accomplish, what you’re stuck with, and relevant source files (a nearly empty .rvt, the .dyn of your current graph and the xlsx file).

I have done :slight_smile:

1 Like

Hi all,

Sorry for the late reply. Been busy lately. If have done similar script as wma_sfenton. Thanks.

Then please mark his comment as his solution (and maybe leave a like for the comments you found to be helpful).

Could you either share that code or posting a better picture please?
(I’m referring to the second post of the 2nd of March)
Thanks!

I didn’t share that picture to give a graph to be used. It’s use is very specific. I just wanted to give an indication of what size you’d be dealing with.

Quite interesting I used to find that to be a large graph.

I would like to kindly ask you could you share (even in private) your dynamo file, I need to create new material from an excel file. I have taken this dynamo project
example
as example but I have still difficult to have access in both physical and thermal section

My graph isn’t creating new materials from an excel file, it’s creating new family types from an excel file. I sent the image to give a sense of how big a Dynamo graph might become.

1 Like

Ive started using orchid to create materials and set parameters from excel, nearly rebuilt the script (general tidy up0 will post when complete

1 Like