Dynamo for Revit: Python Error

Hello everybody,
I have the following problem:


Traceback (most recent call last):
File “”, line 23, in
AttributeError: ‘FamilyInstance’ object has no attribute ‘Symbol’


And here is the Pythonskript:

Phython-Unterstützung aktivieren und DesignScript-Bibliothek laden

import clr

clr.AddReference(“RevitAPI”)

paramCollection = IN[0]
objCollection = IN[1]

valueList = list()

for i, objList in enumerate(objCollection):
for obj in objList:
_valueList = list()
for param in paramCollection[i]:
_valueList.append(obj.Symbol.LookupParameter(param).AsValueString())
valueList.append(_valueList)

OUT = valueList

I’m just getting stuck and hope you can help me with that.

Best Greatings
Jan

For future reference please format python code as “Preformatted text” (the </> icon) so that it retains its formatting.

One of your objects may not have a FamilySymbol. Can you show us your list of inputs?

1 Like

Englisch

Hello Nick, thanks for your feedback. I was able to solve the problem last night. I had a mistake in my thinking.

Greatings
Jan

Hello @jk5M9YP
your import is incomplete and you need to unwrap yours inputs for using the Revit API

1 Like