Skip to content

Commit 6815e41

Browse files
authored
Merge pull request #2913 from WemyssJ/Bug-Fixes
Fix Splasher Create View Filters for View Templates
2 parents 44e3e2d + d6b7277 commit 6815e41

File tree

1 file changed

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

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,13 @@ 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+
template_view = new_doc.GetElement(template_id)
500+
if template_view:
501+
view = template_view
502+
496503
dict_filters = {}
497504
for filt_id in view.GetFilters():
498505
filter_ele = new_doc.GetElement(filt_id)
@@ -628,6 +635,7 @@ def GetName(self):
628635
return "Create Filters"
629636

630637

638+
631639
class ValuesInfo:
632640
def __init__(self, para, val, idt, num1, num2, num3):
633641
self.par = para

0 commit comments

Comments
 (0)