Archi-lab, get Type Parameters does not work, why?

Hello,

for any reason it selects nothing…

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
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

paramNames = IN[1]

if isinstance(IN[0], list):
	elements = []
	for i in IN[0]:
		elements.append(UnwrapElement(i))
else:
	elements = UnwrapElement(IN[0])

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

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

def GetElemType(e):
	doc = DocumentManager.Instance.CurrentDBDocument
	try:
		elemType = doc.GetElement(e.GetTypeId())
		return elemType
	except:
		pass
		return None

def GetParamValue(eType, pName):
	paramValue = None
	for i in eType.Parameters:
		if i.Definition.Name == pName:
			paramValue = i.AsString()
			break
		else:
			continue
	return paramValue

try:
	errorReport = None
	paramValues = []
	if isinstance(elements, list):
		elemTypes = ProcessList(GetElemType, elements)
		if isinstance(paramNames, list):
			for i in paramNames:
				paramValues.append(ProcessListArg(GetParamValue, elemTypes, i))
			paramValues = map(list, zip(*paramValues))
		else:
			paramValues = ProcessListArg(GetParamValue, elemTypes, paramNames)
	else:
		elemTypes = [GetElemType(elements)]
		if isinstance(paramNames, list):
			for i in paramNames:
				paramValues.append(ProcessListArg(GetParamValue, elemTypes, i))
			paramValues = map(list, zip(*paramValues))
		else:
			paramValues = ProcessListArg(GetParamValue, elemTypes, paramNames)
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 = paramValues
else:
	OUT = errorReport

The code looks complex… …or is it a library issue?

KR

Andreas