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
Parameters
- ModelObjects
- Type: System.CollectionsArrayList
An array list of model objects to be removed from the task.
Return Value
Type: BooleanTrue 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