OperationRemoveFromPourUnit Method |
Removes model object from pour unit
Model object types accepted are assembly types except cast in situ,
reinforcements of different kind, components and bolts
Namespace: Tekla.Structures.Model.Operations
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
Parameters
- objectsToBeRemoved
- Type: System.Collections.GenericListModelObject
the list of model objects to be added.
Return Value
Type: BooleanTrue on success.
| Exception | Condition |
|---|---|
| ArgumentException | Throw exceptions if object has invalid ID, do not exist in model or not valid object type. |
The following example shows how to remove one rebar group from the pour unit.
You will have to replace the curly braces for the List with lesser and greater than signs.
using System.Collections.Generic; using Tekla.Structures.Model; using Tekla.Structures.Model.Operations; public class Example { public void ExampleRemoveRebarGroupFromPour(Guid rebarGroupGuid) { var Model = new Model(); ModelObjectEnumerator ObjectEnumerator = Model.GetModelObjectSelector().GetAllObjectsWithType(ModelObject.ModelObjectEnum.REBARGROUP); RebarGroup rebarGroup = null; bool bFound = false; if(ObjectEnumerator.GetSize() > 0) { while(ObjectEnumerator.MoveNext()) { rebarGroup = ObjectEnumerator.Current as RebarGroup; if(rebarGroup != null) { if(rebarGroup.Identifier.GUID == rebarGroupGuid) { bFound = true; break; } } } } if(bFound) { var objectsToRemove = new List{ModelObject}() { rebarGroup }; RemoveFromPourUnit(objectsToRemove); } } }