ifcopenshell.api.sequence.edit_task_time

Module Contents

class ifcopenshell.api.sequence.edit_task_time.Usecase
calculate_duration()
calculate_finish()
execute()
get_task() ifcopenshell.entity_instance
handle_resource_calculation()
ifcopenshell.api.sequence.edit_task_time.edit_task_time(file: ifcopenshell.file, task_time: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcTaskTime

For more information about the attributes and data types of an IfcTaskTime, consult the IFC documentation.

Parameters:
  • task_time (ifcopenshell.entity_instance) – The IfcTaskTime entity you want to edit

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

Example:

# Let's imagine we are creating a construction schedule. All tasks
# need to be part of a work schedule.
schedule = ifcopenshell.api.sequence.add_work_schedule(model, name="Construction Schedule A")

# Create a task to do formwork
task = ifcopenshell.api.sequence.add_task(model,
    work_schedule=schedule, name="Formwork", identification="A")

# Let's say it takes 2 days and starts on the 1st of January, 2000
time = ifcopenshell.api.sequence.add_task_time(model, task=formwork)
ifcopenshell.api.sequence.edit_task_time(model,
    task_time=time, attributes={"ScheduleStart": "2000-01-01", "ScheduleDuration": "P2D"})