Python to select curtain walls in group


#1

Basicly I have a bunch of groups which might have curtain walls as well as other elements. I want to have a list not with ALL the elements in a group but a list with just curtain walls in that group.

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

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

groups = UnwrapElement(IN[0])
elementlist = list()
test = list()
for item in groups:
	try:
		memberlist = list()
		
		for member in item.GetMemberIds():
			memberlist.append(item.Document.GetElement(member))
			if member.GetType().ToString() == "Autodesk.Revit.DB.WallType":
				test.append(member.GetType().ToString())
				test.append(member.Kind)
		elementlist.append(memberlist)
	except:
		elementlist.append(list())

OUT = elementlist,test

elementlist works fine.
test not …

test is created to see what the result is … if that is like ‘Curtain Wall’ then I want a add a ‘true’ value…
But now the return is ElementId. … I thought wall within a group would return WallType … ?