Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am looking for a filter that will find all views that support visibility.
for each of the views that I find I want to apply IsFilterApplied(id). However this thows an exception if I try to call on some viewtypes.
Dim objFilteredElementCollector1 As FilteredElementCollector = New FilteredElementCollector(objDocument) objFilteredElementCollector1.OfClass(GetType(DB.View)).Cast(Of DB.View).Where(Function(v) _ v.ViewType <> ViewType.ProjectBrowser And v.ViewType <> ViewType.SystemBrowser And v.ViewType <> ViewType.Schedule And v.ViewType <> ViewType.PanelSchedule And v.ViewType <> ViewType.PresureLossReport And v.ViewType <> ViewType.ColumnSchedule And v.ViewType <> ViewType.LoadsReport) Dim ListOfViewElementId As List(Of ElementId) = objFilteredElementCollector1.ToElementIds()
Any ideas?
Kind regards
David
Solved! Go to Solution.