Zero Touch - How to return list of elements

That return statement looks good and it seems to be doing what it’s supposed to inside Dynamo. Tho I’m not sure why you’re generating new lists instead of using the existing lists?

I guess your question is how to return a Dynamo element instead? You’ll need to wrap the Revit element like so:

types.Add(doc.GetElement(id).ToDSType(true) )

You could also give the new C# interpreter a try. It’s up on the package manager:

4 Likes