Discarding the stacked walls [Walls.FilterStakedWalls]

image
I’ve been searching for Walls.FilterStakedWalls node, but I didn’t find it yet. I am trying to just select basic wall without selecting Curtain Walls and Stacked Walls. as you know if you choose Walls as the category, and you get all of the Walls, including Basic Walls, Curtain Walls and Stacked Walls. or I want to discarding the stacked walls.

Thanks

by python:

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

elem = UnwrapElement(IN[0])

output = []
for e in elem:
    if not getattr(e, 'CurtainGrid') and not e.IsStackedWallMember:
        output.append(e)

OUT = output
2 Likes

Thanks for the short solution :kissing_heart:

1 Like

# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

# Place your code below this line
list=UnwrapElement(IN[0])
walls=[]
swalls=[]
swallmembers=[]
cwalls=[]
for item in list:
	
	if  item.IsStackedWall:
		swalls.append(item)
	elif item.IsStackedWallMember:
		swallmembers.append(item)
	elif item.CurtainGrid!=None:
		cwalls.append(item)
	else:
		walls.append(item)
	
# Assign your output to the OUT variable.
OUT = walls,cwalls,swalls,swallmembers
1 Like