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

TaskAddObjectsToTask Method

Adds objects to the task.

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2019.0.0.0 (2019.0.0.0)
Syntax
public bool AddObjectsToTask(
	ArrayList ModelObjects
)

Parameters

ModelObjects
Type: System.CollectionsArrayList
An array list of model objects to be added to the task.

Return Value

Type: Boolean
True on success.
Examples
using Tekla.Structures.Model;
using System.Collections;

public class Example
{
       public void Example1()
       {
           // Add beam1 and beam2 into the task.
           Task task = new Task();
           Beam beam1 = new Beam();
           Beam beam2 = new Beam();

           if (task.Insert() &&
               beam1.Insert() &&
               beam2.Insert())
           {
               ArrayList objectsToAdd = new ArrayList();
               objectsToAdd.Add(beam1);
               objectsToAdd.Add(beam2);

               task.AddObjectsToTask(objectsToAdd);
           }
       }
}
See Also