Skip to content

Commit

Permalink
no-group groups are ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkasirer committed Nov 17, 2023
1 parent 59b827e commit e329726
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/compas_cadwork/utilities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def unload_module(module_name):
for module in modules:
sys.modules.pop(module)

def get_language() -> str:
"""Returns the current language of the cadwork application."""
return uc.get_language()

def get_group(element: int) -> str:
"""
[:information_source: Available for script filled attributes](#){.mark-text}
Expand Down Expand Up @@ -98,6 +102,9 @@ def get_element_groups() -> Dict[str, List]:
)
groups_elements = defaultdict(list)
for element_id in ec.get_all_identifiable_element_ids():
group_name = get_grouping_name(element_id)
if group_name is None or group_name == "":
continue
groups_elements[get_grouping_name(element_id)].append(Element.from_id(element_id))
return groups_elements

Expand Down

0 comments on commit e329726

Please sign in to comment.