# How to set the material parameters "Class" and "Keywords"

**URL:** <https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392>\
**Category:** Revit\
**Created:** [June 7, 2016, 10:54pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392 "2016-06-07T22:54:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Goncalves](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jose\_Goncalves](https://forum.dynamobim.com/u/Jose_Goncalves)\
**Post date:** [June 7, 2016, 10:54pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/1 "2016-06-07T22:54:43Z")

</div>

Please Help!

I’m new to Dynamo and can’t set the parameters “Class” and “Keywords” from dynamo to revit, all others parameters I’ve manage to change. but this two just don’t get the way to do it.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/a/a76c22218f0953a9223f544955c00ea3103ab0f0.png)  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/1/111bdc1e47554de78074b9faf1e21e5f6541e576.png)

Thanks,

J

---

<div class="post-metadata">

**Author:** ![Jose\_Goncalves](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jose\_Goncalves](https://forum.dynamobim.com/u/Jose_Goncalves)\
**Post date:** [August 2, 2016, 8:59pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/2 "2016-08-02T20:59:04Z")

</div>

Is it Possible?! Can anyone help please.!!!

---

<div class="post-metadata">

**Author:** ![DAdduci](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@DAdduci](https://forum.dynamobim.com/u/DAdduci)\
**Post date:** [December 1, 2017, 10:25am UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/3 "2017-12-01T10:25:32Z")

</div>

Hey Jose,

I was wondering if you have figured this out yet?? This would be an amazing time saver if it worked!!  
By chance… have you gotten this to work for the “Description” under the “Appearance” Tab??

These two things are slowing us down from creating mass materials.

Please let me know when you can!

Thanks!

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [December 1, 2017, 10:30am UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/4 "2017-12-01T10:30:52Z")

</div>

@DAdduci  
Can you send a screenshot of what you tried or links to what you found on this topic? [Here](https://stackoverflow.com/questions/45697290/revit-api-material-asset-parameters-get-and-set) is one example of the information that could help to solve this issue.

---

<div class="post-metadata">

**Author:** ![DAdduci](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@DAdduci](https://forum.dynamobim.com/u/DAdduci)\
**Post date:** [December 1, 2017, 12:05pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/5 "2017-12-01T12:05:52Z")

</div>

This is the only thread that I have found on this specific topic on “Keywords”… I use RF Tools to update the rest of the Parameter Fields.

I’ll send your link to my team and hopefully we can figure this out.

Thanks for responding!!

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 1, 2017, 1:19pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/6 "2017-12-01T13:19:51Z")

</div>

What Revit version are you in? A lot of material stuff isn’t exposed until 2018.1 .

---

<div class="post-metadata">

**Author:** ![DAdduci](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@DAdduci](https://forum.dynamobim.com/u/DAdduci)\
**Post date:** [December 1, 2017, 2:44pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/7 "2017-12-01T14:44:29Z")

</div>

That’s what I read in the article above… We are usually 3 years behind the latest version of Revit. So we are using “mostly” 2015 and changing to 2016 in the months ahead.

---

<div class="post-metadata">

**Author:** ![daniel.petrin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel.petrin/32/27974_2.png) [@daniel.petrin](https://forum.dynamobim.com/u/daniel.petrin)\
**Post date:** [November 1, 2019, 4:08pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/8 "2019-11-01T16:08:34Z")

</div>

My friend @ramoon.bandeira made this python script.

**SET CLASS:**

import clr  
clr.AddReference(‘RevitAPI’)  
from Autodesk.Revit.DB import \*

clr.AddReference(‘RevitServices’)  
from RevitServices.Persistence import DocumentManager  
doc = DocumentManager.Instance.CurrentDBDocument

def toList(item):  
if isinstance(item, list):  
return item  
else:  
return [item]

def SetMaterialClass(material, value):  
tx = Transaction(doc, “Set Material Value”)  
tx.Start()  
material.MaterialClass = value  
tx.Commit()  
return material

Material = UnwrapElement(toList(IN[0]))  
Values = toList(IN[1])

OUT = [SetMaterialClass(mat,v) for mat,v in zip(Material, Values)]

**GET CLASS:**

import clr  
clr.AddReference(‘RevitAPI’)  
from Autodesk.Revit.DB import \*

def toList(item):  
if isinstance(item, list):  
return item  
else:  
return [item]

Material = UnwrapElement(toList(IN[0]))

OUT = [mat.MaterialClass for mat in Material]

[GetClasseMaterial.dyf](https://forum.dynamobim.com/uploads/short-url/uE57lw79wNgiORtt4ahBLEsbP18.dyf) (4.9 KB)  
[SetClasseMaterial.dyf](https://forum.dynamobim.com/uploads/short-url/iYIYFBVFngWCEIEqt3GE34z8mn1.dyf) (7.1 KB)

---

<div class="post-metadata">

**Author:** ![Jose\_Goncalves](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jose\_Goncalves](https://forum.dynamobim.com/u/Jose_Goncalves)\
**Post date:** [November 2, 2019, 12:29pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/9 "2019-11-02T12:29:02Z")

</div>

Thank you so much!!!

---

<div class="post-metadata">

**Author:** ![Jose\_Goncalves](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@Jose\_Goncalves](https://forum.dynamobim.com/u/Jose_Goncalves)\
**Post date:** [November 2, 2019, 12:30pm UTC](https://forum.dynamobim.com/t/how-to-set-the-material-parameters-class-and-keywords/4392/10 "2019-11-02T12:30:13Z")

</div>

Thanks you!!!
