import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
items = UnwrapElement(IN[0])
names = IN[1]
goodlist = list()
badlist = list()
counter = 0

TransactionManager.Instance.EnsureInTransaction(doc)
while counter < len(items):
	try:
		items[counter].Name = names[counter]
		goodlist.append(items[counter].ToDSType(True))
	except:
		badlist.append(items[counter].ToDSType(True))
	counter += 1
TransactionManager.Instance.TransactionTaskDone()

OUT = (goodlist,badlist)
bf426993fa2bbc71e50f6f839188316161ea5e42
<mask token>

<mask token>
clr.AddReference('RevitAPI')
<mask token>
clr.AddReference('RevitNodes')
<mask token>
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
<mask token>
TransactionManager.Instance.EnsureInTransaction(doc)
while counter < len(items):
    try:
        items[counter].Name = names[counter]
        goodlist.append(items[counter].ToDSType(True))
    except:
        badlist.append(items[counter].ToDSType(True))
    counter += 1
TransactionManager.Instance.TransactionTaskDone()
<mask token>

<mask token>
clr.AddReference('RevitAPI')
<mask token>
clr.AddReference('RevitNodes')
<mask token>
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
<mask token>
doc = DocumentManager.Instance.CurrentDBDocument
items = UnwrapElement(IN[0])
names = IN[1]
goodlist = list()
badlist = list()
counter = 0
TransactionManager.Instance.EnsureInTransaction(doc)
while counter < len(items):
    try:
        items[counter].Name = names[counter]
        goodlist.append(items[counter].ToDSType(True))
    except:
        badlist.append(items[counter].ToDSType(True))
    counter += 1
TransactionManager.Instance.TransactionTaskDone()
OUT = goodlist, badlist

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
items = UnwrapElement(IN[0])
names = IN[1]
goodlist = list()
badlist = list()
counter = 0
TransactionManager.Instance.EnsureInTransaction(doc)
while counter < len(items):
    try:
        items[counter].Name = names[counter]
        goodlist.append(items[counter].ToDSType(True))
    except:
        badlist.append(items[counter].ToDSType(True))
    counter += 1
TransactionManager.Instance.TransactionTaskDone()
OUT = goodlist, badlist

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
items = UnwrapElement(IN[0])
names = IN[1]
goodlist = list()
badlist = list()
counter = 0

TransactionManager.Instance.EnsureInTransaction(doc)
while counter < len(items):
	try:
		items[counter].Name = names[counter]
		goodlist.append(items[counter].ToDSType(True))
	except:
		badlist.append(items[counter].ToDSType(True))
	counter += 1
TransactionManager.Instance.TransactionTaskDone()

OUT = (goodlist,badlist)