Hi I want to get the ElementID by passing in VIew Name from sections.
I want to set “Far Clip Offset” to room bounding walls, dont know how to do that witout extracting the ElementID by the View Name.
Trying to make a Python-script but dosent seem to work.
Error: Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 25, in
File “”, line 19, in get_ElementIds_from_name
TypeError: list is not callable
import clr
import System
from System.Collections.Generic import List
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
def get_ElementIds_from_name(Name):
rule = ParameterFilterRuleFactory.CreateEqualsRule(Name(BuiltInParameter.VIEW_NAME), Name, True)
filt = ElementParameterFilter(rule)
return FilteredElementCollector(doc).WherePasses(filt).WhereElementIsNotElementType().ToElementIds()
test = "1123 Sandfilter - Vy 2"
OUT = [get_ElementIds_from_name(Name) for Name in IN[0]]