HI all,
I am trying to filter Floor plans from all views.
Previously i tried with ViewType, i have got ViewType as FLoorPlan.Now i am using same type to filter from all views.check and suggest me
HI all,
I am trying to filter Floor plans from all views.
Previously i tried with ViewType, i have got ViewType as FLoorPlan.Now i am using same type to filter from all views.check and suggest me
@jagadeesh116 try it like this:
views = FilteredElementCollector(doc).OfClass(View)
floorPlans = []
for v in views:
if v.ViewType.ToString() == "FloorPlan":
floorPlans.append(v)
#floorPlans.append(v.Name)
OUT = floorPlans
Your filtered element collector is not complete, I think.
views = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Views).WhereElementIsNotElementType().ToElements()
floorPlans = [v.Name for v in views if isinstance(v, ViewPlan)]
OUT = floorPlans