ModelObjectSelectorGetAllObjectsWithType Method (Type)

Returns an enumerator of all the model objects in the current model with the given base type.

Namespace:  Tekla.Structures.Model
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
public ModelObjectEnumerator GetAllObjectsWithType(
	Type[] TypeFilter
)

Parameters

TypeFilter
Type: SystemType
The types of the objects to return.

Return Value

Type: ModelObjectEnumerator
A model object enumerator of all the model objects with the given types.
Examples
In the following example a connection to the Tekla Structures model is established and all parts and boolean objects are fetched for enumeration from the model.
using Tekla.Structures.Model;

public class Example
{
       public void Example1()
       {
           Model Model = new Model();

           System.Type[] Types = new System.Type[2];
           Types.SetValue(typeof(Part),0);
           Types.SetValue(typeof(Boolean),1);

           ModelObjectEnumerator myEnum = Model.GetModelObjectSelector().GetAllObjectsWithType(Types);
       }
}
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