Skip to content

Commit 9ab10f5

Browse files
authored
Update Color Splasher
#2626 (comment) Color Splasher - line 131 DB.ElementId.InvalidElementId (in versions 2024 and earlier) this is ignored and keep default, I get exception thrown for 2025 and 2026, since I don't think we need to change the line pattern, I am proposing to eliminate this line. Color Splasher - Filter Name separator between cat and param name, added a space in line 364 Color Splasher - Create Legend not working, Fixed the conditional statement,
1 parent fa28d4f commit 9ab10f5

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def Execute(self, uiapp):
128128
if solid_fill_id is not None:
129129
ogs.SetSurfaceForegroundPatternId(solid_fill_id)
130130
ogs.SetCutForegroundPatternId(solid_fill_id)
131-
ogs.SetProjectionLinePatternId(DB.ElementId(-1))
131+
132132
for idt in wndw.list_box2.Items[indx]['Value'].ele_id:
133133
view.SetElementOverrides(idt, ogs)
134134
except Exception:
@@ -197,7 +197,7 @@ def Execute(self, uiapp):
197197
if vw.ViewType == DB.ViewType.Legend:
198198
legends.append(vw)
199199
break
200-
if len(legends) < 0:
200+
if len(legends) = 0:
201201
task2 = UI.TaskDialog("Color Elements by Parameter")
202202
task2.MainInstruction = "In order to create a new legend, you need to have at least one. Please, create a legend view."
203203
wndw.TopMost = False
@@ -361,7 +361,7 @@ def Execute(self, uiapp):
361361
ogs.SetSurfaceForegroundPatternId(solid_fill_id)
362362
ogs.SetCutForegroundPatternId(solid_fill_id)
363363
# Get filters apply to view
364-
filter_name = sel_cat.name + "/" + sel_par.name + " - " + item.value
364+
filter_name = sel_cat.name + " " + sel_par.name + " - " + item.value
365365
# added ':' character and chaged the removal method to translate, ref: issue #2466
366366
filter_name = filter_name.translate({ord(i): None for i in "{}[]:\\|?/<>*"})
367367
if filter_name in dict_filters or filter_name in dict_rules:

0 commit comments

Comments
 (0)