From 74600376022aa3f44c1fbaf0df36752e9ee560e1 Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Wed, 11 Mar 2026 21:39:15 -0500 Subject: [PATCH] Fix #7774: Fix Select Similar failing on pset names with spaces Pset names containing spaces (e.g. "SOLIDWORKS Custom Properties") were not quoted when building selector keys in SelectSimilarData, causing get_element_value to fail when the operator ran. Now wraps pset names and property names in double quotes if they contain spaces, consistent with the selector syntax used elsewhere. Generated with the assistance of an AI coding tool. --- src/bonsai/bonsai/bim/module/search/data.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/search/data.py b/src/bonsai/bonsai/bim/module/search/data.py index 8c2fad00b0..ec954004c6 100644 --- a/src/bonsai/bonsai/bim/module/search/data.py +++ b/src/bonsai/bonsai/bim/module/search/data.py @@ -132,5 +132,12 @@ class SelectSimilarData: if pset.endswith("Common"): keys.extend([f'/.*Common/."{name}"' for name in properties.keys() if name != "id"]) else: - keys.extend([f"{pset}.{name}" for name in properties.keys() if name != "id"]) + pset_part = f'"{pset}"' if " " in pset else pset + keys.extend( + [ + f'{pset_part}."{name}"' if " " in name else f"{pset_part}.{name}" + for name in properties.keys() + if name != "id" + ] + ) return [(k, k, "") for k in keys]