TaskRemoveObjectsFromTask Method

Removes objects from the task.

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

Parameters

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

Return Value

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

public class Example
{
       public void Example1()
       {
           Identifier Identifier1 = new Identifier(357);

           // Remove all the children from the task.
           Task task = new Task(Identifier1);

           if (task.Select())
           {
               ModelObjectEnumerator taskChildren = task.GetChildren();
               ArrayList objectsToRemove = new ArrayList();

               while (taskChildren.Current != null)
               objectsToRemove.Add(taskChildren.Current);

               task.RemoveObjectsFromTask(objectsToRemove);
           }
       }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next