This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

TaskDependency Constructor (Task, Task)

Creates a new task dependency instance with the given primary and secondary tasks.

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
public TaskDependency(
	Task primary,
	Task secondary
)

Parameters

primary
Type: Tekla.Structures.ModelTask
The primary task to be used.
secondary
Type: Tekla.Structures.ModelTask
The secondary task to be used.
Examples
using Tekla.Structures.Model;

public class Example
{
       public void Example1()
       {
           bool Result = false;
           Task Task1 = new Task();
           Task Task2 = new Task();
           Task1.Name = "Default Task 0000";
           Task2.Name = "Default Task 0001";
           Task1.Insert();
           Task2.Insert();
           TaskDependency TaskDependency1 = new TaskDependency(Task1, Task2);
           TaskDependency1.DependencyType = TaskDependency.DependencyTypeEnum.START_TO_FINISH;
           Result = TaskDependency1.Insert();
       }
}
See Also