Skip to content

Commit 0f6439b

Browse files
authored
Fix Splasher Create View Filters for View Templates
Fixed issue where "Create View Filters" would not work when being applied to a view template. Previously the overrides would be applied <By Filter> but the filter would not appear in the view templates Filters list - and would be unable to be adjusted / removed.
1 parent 44e3e2d commit 0f6439b

File tree

1 file changed

+5
-0
lines changed
  • extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/ColorSplasher.pushbutton

1 file changed

+5
-0
lines changed

extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/ColorSplasher.pushbutton/script.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,11 @@ def Execute(self, uiapp):
493493
new_doc = uiapp.ActiveUIDocument.Document
494494
view = get_active_view(new_doc)
495495
if view != 0:
496+
# Redirect to template if one exists
497+
template_id = view.ViewTemplateId
498+
if template_id != DB.ElementId.InvalidElementId:
499+
view = new_doc.GetElement(template_id)
500+
496501
dict_filters = {}
497502
for filt_id in view.GetFilters():
498503
filter_ele = new_doc.GetElement(filt_id)

0 commit comments

Comments
 (0)