mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
bim.save_search - not to fail silently
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
import bpy
|
import bpy
|
||||||
import json
|
import json
|
||||||
import bisect
|
import bisect
|
||||||
|
import traceback
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
import ifcopenshell.api
|
import ifcopenshell.api
|
||||||
import ifcopenshell.api.group
|
import ifcopenshell.api.group
|
||||||
@@ -193,6 +194,8 @@ class SaveSearch(Operator, tool.Ifc.Operator):
|
|||||||
query = tool.Search.export_filter_query(filter_groups)
|
query = tool.Search.export_filter_query(filter_groups)
|
||||||
results = ifcopenshell.util.selector.filter_elements(tool.Ifc.get(), query)
|
results = ifcopenshell.util.selector.filter_elements(tool.Ifc.get(), query)
|
||||||
except:
|
except:
|
||||||
|
print(traceback.format_exc())
|
||||||
|
self.report({"ERROR"}, "Error occurred trying save search.")
|
||||||
return
|
return
|
||||||
|
|
||||||
description = json.dumps({"type": "BBIM_Search", "query": query})
|
description = json.dumps({"type": "BBIM_Search", "query": query})
|
||||||
|
|||||||
Reference in New Issue
Block a user