2022-01-19 12:18:33 +11:00
|
|
|
# IfcOpenShell - IFC toolkit and geometry engine
|
|
|
|
|
# Copyright (C) 2021 Dion Moult <dion@thinkmoult.com>
|
|
|
|
|
#
|
|
|
|
|
# This file is part of IfcOpenShell.
|
|
|
|
|
#
|
|
|
|
|
# IfcOpenShell is free software: you can redistribute it and/or modify
|
|
|
|
|
# it under the terms of the GNU Lesser General Public License as published by
|
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# IfcOpenShell is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU Lesser General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
|
2024-05-13 12:27:53 +05:00
|
|
|
import ifcopenshell
|
2022-01-19 12:18:33 +11:00
|
|
|
|
2021-10-01 13:29:10 +10:00
|
|
|
|
2024-05-13 12:27:53 +05:00
|
|
|
def remove_application(file: ifcopenshell.file, application: ifcopenshell.entity_instance) -> None:
|
2024-05-06 14:35:39 +10:00
|
|
|
"""Removes an application
|
2022-12-14 15:58:31 +11:00
|
|
|
|
2024-05-06 14:35:39 +10:00
|
|
|
Warning: removing an application may invalidate ownership histories.
|
|
|
|
|
Check whether or not the application is used anywhere prior to removal.
|
2022-12-14 15:58:31 +11:00
|
|
|
|
2024-05-06 14:35:39 +10:00
|
|
|
:param address: The IfcApplication to remove.
|
|
|
|
|
:return: None
|
2022-12-14 15:58:31 +11:00
|
|
|
|
2024-05-06 14:35:39 +10:00
|
|
|
Example:
|
2023-01-10 10:16:28 +11:00
|
|
|
|
2024-05-06 14:35:39 +10:00
|
|
|
.. code:: python
|
2022-12-14 15:58:31 +11:00
|
|
|
|
2024-06-28 12:36:31 +10:00
|
|
|
application = ifcopenshell.api.owner.add_application(model)
|
|
|
|
|
ifcopenshell.api.owner.remove_address(model, application=application)
|
2024-05-06 14:35:39 +10:00
|
|
|
"""
|
2025-03-14 10:43:47 +05:00
|
|
|
file.remove(application)
|