Wall type function is "Exterior" with python


Hi all,

I would like to get only exterior wall with a python script.

I did this (see below):

#Import librairies and Namespaces
import clr
import System
import math

from Autodesk.DesignScript.Geometry import *

#Document and Transaction
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from Autodesk.Revit.DB import *

import Autodesk
from Autodesk.Revit.DB.LabelUtils import GetLabelFor
from Autodesk.Revit.DB.ParameterFilterRuleFactory import CreateEqualsRule
from Autodesk.Revit.DB.ElementId import *
#Define the inputdata

Walls = UnwrapElement(IN[0])

#Creating a variable doc which set the active Revit application and document

doc = DocumentManager.Instance.CurrentDBDocument
#Start the script

#Avoir les murs ayant une fonction du mur


#End the script


It doesn’t work , Dynamo said that : no module named ElementId

Thank you for your help :slight_smile:


Is this what you are trying to achieve?


This is an issue there has been dealt with before…


I don’t want to use str because if my revit are not in english that kind of script doesn’t work.

That’s why, I’m using API.


Yes :slight_smile:


Please mark post as solved.


To clarify, the link and python pointed out by @erfajo also works, regardless of language for anyone other than the initial coder, and has the added benefit of allowing selection of other walls by their type, so I’m putting forth this hybrid of both codes incase it helps someone else find walls of a given function in the future.