# Material Asset Names

**URL:** <https://forum.dynamobim.com/t/material-asset-names/4824>\
**Category:** Developers\
**Tags:** revit, archi-lab\
**Created:** [July 1, 2016, 5:24pm UTC](https://forum.dynamobim.com/t/material-asset-names/4824 "2016-07-01T17:24:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [July 1, 2016, 6:09pm UTC](https://forum.dynamobim.com/t/material-asset-names/4824/2 "2016-07-01T18:09:35Z")

</div>

@Chad_Clary,

This is indeed a little tricky because these elements don’t have a Parameter called name, but instead its a property. Here’s how you can handle it.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/cde6e7de255ed64797e9da28d5b375f7ff6bb5e8.png)

Here’s the code that’s inside of Python:

```auto
# Copyright(c) 2016, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net

# Import Element wrapper extension methods
import clr
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

import sys
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
sys.path.append(pyt_path)

#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN

def ProcessList(_func, _list):
    return map( lambda x: ProcessList(_func, x) if type(x)==list else _func(x), _list )

def ProcessParallelLists(_func, *lists):
	return map( lambda *xs: ProcessParallelLists(_func, *xs) if all(type(x) is list for x in xs) else _func(*xs), *lists )

def SetName(e, name):
	e.Name = name
	return e

def Unwrap(item):
	return UnwrapElement(item)

if isinstance(IN[0], list):
	elements = ProcessList(Unwrap, IN[0])
else:
	elements = [Unwrap(IN[0])]

names = IN[1]

try:
	errorReport = None
	TransactionManager.Instance.EnsureInTransaction(doc)
	output = ProcessParallelLists(SetName, elements, names)
	TransactionManager.Instance.TransactionTaskDone()
except:
	# if error accurs anywhere in the process catch it
	import traceback
	errorReport = traceback.format_exc()

#Assign your output to the OUT variable
if errorReport == None:
	OUT = output
else:
	OUT = errorReport

```

Basically we created a method that will override a Name property on any element.

Cheers!

---

_[View the full topic](https://forum.dynamobim.com/t/material-asset-names/4824)._
