STK ObjectsSend comments on this topic.
GetElements Method (IAgStkObjectCollection)
See Also
EClassType
Windows





Windows & Linux

Description

Returns a collection of objects of specified type.

Syntax

[Visual Basic .NET]
Public Function GetElements( _
    ByVal EClassType As AgESTKObjectType _
) As IAgStkObjectElementCollection
[Managed C++]
public: IAgStkObjectElementCollection^ GetElements(
    AgESTKObjectType EClassType
);
[Unmanaged C++]
public: HRESULT GetElements(
    AgESTKObjectType EClassType,
    IAgStkObjectElementCollection ** ppRetVal
);
[Python - STK API ]
def GetElements(self, EClassType:"AgESTKObjectType") -> "IAgStkObjectElementCollection":

Parameters

EClassType

See Also

Example

Retrieve the list of scenario's children of a given type
[C#]
IAgStkObjectElementCollection allChildrenOfType = root.CurrentScenario.Children.GetElements(type);

foreach (IAgStkObject o in allChildrenOfType)
{
    Console.WriteLine(o.InstanceName);
}
Retrieve the list of scenario's children of a given type
[Visual Basic .NET]
Dim allChildrenOfType As IAgStkObjectElementCollection = root.CurrentScenario.Children.GetElements(type)

For Each o As IAgStkObject In allChildrenOfType
	Console.WriteLine(o.InstanceName)
Next
© 2024 Analytical Graphics, Inc. All Rights Reserved.