Filter list of elements by kind

Good evening. I am a beginner in Dynamo and my AIM Is ti obtain the Wall orientation in my model. As you can see from the list ‘All elements of category’ i have both Wall and FaceWall, these last items are the ones that puts the script in error. Is It possibile to filter the list of elements mantaining only ‘Wall’ instances and not ‘FaceWall’? Thanks in Advance

Prior to posting it is recommended to search the forum first.

Hi @umberto95,

Welcome to the Dynamo Forum.
Interesting question. :slightly_smiling_face:

You have to use Python to filter the FaceWalls :

import clr
import Autodesk
from Autodesk.Revit.DB import *

walls = UnwrapElement(IN[0])
for wall in walls:
	if not isinstance(wall,Autodesk.Revit.DB.FaceWall):

OUT = result
1 Like

thank you for your fast reply. I’m a building engineer and my programming curriculum is almost zero. i tried to type the text in a code block but it says that i don’t have an EOF, also in the code block i don’t see the numbers in column as your screenshot; how should i act?
Thank you again

You probably forgot the ; or the " at the beginning and the end of the code block.

The numbers in column in the code block are only present in Dynamo 2.6 in Revit 2021.

Thanks, i had forgot the " at the end. Now, differing from your example the Phyton Script from String goes in error with this kind. Do you have any idea? If It depends due to the complexity of my project? In the ‘Watch’ node i have Just FaceWall and Wall like you

Copy and paste would have saved you from this error.
It’s FaceWall and not Facewall.

I can not thank you enough for your help. Many thanks.