mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
This commit is contained in:
@@ -30,6 +30,9 @@ templates: dict[str, "PsetQto"] = {}
|
|||||||
|
|
||||||
|
|
||||||
def get_template(schema: str) -> "PsetQto":
|
def get_template(schema: str) -> "PsetQto":
|
||||||
|
"""
|
||||||
|
:param schema: As in ``file.schema_identifier``, not ``file.schema``.
|
||||||
|
"""
|
||||||
global templates
|
global templates
|
||||||
if schema not in templates:
|
if schema not in templates:
|
||||||
templates[schema] = PsetQto(schema)
|
templates[schema] = PsetQto(schema)
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ def set_element_value(
|
|||||||
if len(enum_values) == len(current_value) and set(enum_values) == set(current_value):
|
if len(enum_values) == len(current_value) and set(enum_values) == set(current_value):
|
||||||
return ...
|
return ...
|
||||||
|
|
||||||
template = ifcopenshell.util.pset.get_template(ifc_file.schema)
|
template = ifcopenshell.util.pset.get_template(ifc_file.schema_identifier)
|
||||||
pset_template = template.get_by_name(pset.Name)
|
pset_template = template.get_by_name(pset.Name)
|
||||||
if pset_template is None:
|
if pset_template is None:
|
||||||
return value
|
return value
|
||||||
|
|||||||
Reference in New Issue
Block a user