ModelObjectSelector Class |
The ModelObjectSelector class can be used to select objects from the Tekla Structures user interface.
Currently, these selections both select the objects from the database and highlight them visually.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model.UI
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The ModelObjectSelector type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ModelObjectSelector |
Creates a new model object selector instance.
|
Methods
Name | Description | |
---|---|---|
GetObjectsByBoundingBox |
Returns an enumerator of the given view's visible model objects that collide 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.
| |
GetSelectedObjects |
Returns an enumerator of all the selected model objects in the model view.
| |
Select(ArrayList) |
Selects a list of objects from the user interface.
| |
Select(ArrayList, Boolean) |
Selects a list of objects from the user interface.
|
Examples
using Tekla.Structures.Model; using Tekla.Structures.Geometry3d; using System.Collections; public class Example { public void Example1() { Model Model = new Model(); Beam B = new Beam(new Point(0,0,0), new Point(0,0,6000)); Beam B1 = new Beam(new Point(0,1000,0), new Point(0,1000,6000)); Beam B2 = new Beam(new Point(0,2000,0), new Point(0,2000,6000)); B.Insert(); B1.Insert(); B2.Insert(); ArrayList ObjectsToSelect = new ArrayList(); ObjectsToSelect.Add(B); ObjectsToSelect.Add(B2); Tekla.Structures.Model.UI.ModelObjectSelector MS = new Tekla.Structures.Model.UI.ModelObjectSelector(); MS.Select(ObjectsToSelect); Model.CommitChanges(); } }
See Also