mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Bonsai - prevent duplicating IfcOpenShell organization for new IfcApplications
This commit is contained in:
@@ -291,8 +291,10 @@ def get_application(ifc: ifcopenshell.file) -> ifcopenshell.entity_instance:
|
|||||||
for element in ifc.by_type("IfcApplication"):
|
for element in ifc.by_type("IfcApplication"):
|
||||||
if element.ApplicationIdentifier == identifier:
|
if element.ApplicationIdentifier == identifier:
|
||||||
return element
|
return element
|
||||||
|
application_developer = next((org for org in ifc.by_type("IfcOrganization") if org.Name == "IfcOpenShell"), None)
|
||||||
application = ifcopenshell.api.owner.add_application(
|
application = ifcopenshell.api.owner.add_application(
|
||||||
ifc,
|
ifc,
|
||||||
|
application_developer=application_developer,
|
||||||
version=version,
|
version=version,
|
||||||
application_full_name="Bonsai",
|
application_full_name="Bonsai",
|
||||||
application_identifier=identifier,
|
application_identifier=identifier,
|
||||||
|
|||||||
Reference in New Issue
Block a user