This commit is contained in:
Andrej730
2024-05-10 11:21:53 +05:00
parent e7eb00eaa3
commit c50d1ea2fe
105 changed files with 502 additions and 251 deletions
@@ -17,9 +17,12 @@
# along with IfcOpenShell. If not, see <http://www.gnu.org/licenses/>.
import ifcopenshell.util.date
from typing import Any
def edit_work_plan(file, work_plan=None, attributes=None) -> None:
def edit_work_plan(
file: ifcopenshell.file, work_plan: ifcopenshell.entity_instance, attributes: dict[str, Any]
) -> None:
"""Edits the attributes of an IfcWorkPlan
For more information about the attributes and data types of an
@@ -28,7 +31,7 @@ def edit_work_plan(file, work_plan=None, attributes=None) -> None:
:param work_plan: The IfcWorkPlan entity you want to edit
:type work_plan: ifcopenshell.entity_instance
:param attributes: a dictionary of attribute names and values.
:type attributes: dict, optional
:type attributes: dict
:return: None
:rtype: None
@@ -43,7 +46,7 @@ def edit_work_plan(file, work_plan=None, attributes=None) -> None:
ifcopenshell.api.run("sequence.edit_work_plan", model,
work_plan=work_plan, attributes={"Description": "Construction of phase 1"})
"""
settings = {"work_plan": work_plan, "attributes": attributes or {}}
settings = {"work_plan": work_plan, "attributes": attributes}
for name, value in settings["attributes"].items():
if value: