ModelObjectSelector Class |
The ModelObjectSelector class can be used to make different model object selections
from the current model.
SystemObject
Tekla.Structures.ModelModelObjectSelector
Tekla.Structures.ModelModelObjectSelector
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2026.0.0-alpha00057080+93cd22c410a086ecc356b7088d4daaf2e12907eb
The ModelObjectSelector type exposes the following members.
| Name | Description | |
|---|---|---|
| GetAllObjects |
Returns an enumerator of all the model objects in the current model.
| |
| GetAllObjectsWithType(Type) |
Returns an enumerator of all the model objects in the current model with the given base type.
| |
| GetAllObjectsWithType(ModelObjectModelObjectEnum) |
Returns an enumerator of all the model objects in the current model with the given type.
| |
| GetEnumerator |
Returns an enumerator of all the model objects in the current model.
| |
| GetFilteredObjectsWithType |
Returns an enumerator of the model objects in the current model with the given type and selected by the filter.
| |
| GetObjectsByBoundingBox |
Returns an enumerator of the model objects in the current model colliding with the given
geometrical bounding box. Note that this method uses approximate bounding
boxes and thus is NOT EXACT, and may return objects not necessarily colliding
with the given box but only being somewhere near to it.
| |
| GetObjectsByFilter | Returns an enumerator of the model objects in the current model selected by the given selection filter definition. | |
| GetObjectsByFilterName |
Returns an enumerator of the model objects in the current model selected by the given selection
filter.
|
using Tekla.Structures.Model; public class Example { public void Example1() { Model Model = new Model(); ModelObjectSelector Selector = Model.GetModelObjectSelector(); ModelObjectEnumerator listObjects = Selector.GetAllObjects(); foreach(ModelObject MO in listObjects) { Beam B = MO as Beam; if(B != null) { Solid solid = B.GetSolid(); } } } }