AGI STK Objects 11 Send comments on this topic.
GetElements Method (IAgStkObjectCollection)
See Also  Example
EClassType





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 ** ReturnValue
);

Parameters

EClassType
Member Value Description
eAdvCat 0 AdvCAT.
eAircraft 1 Aircraft.
eAreaTarget 2 Area Target.
eAttitudeCoverage 3 Attitude Coverage.
eChain 4 Chain.
eCommSystem 5 CommSystem.
eConstellation 6 Constellation.
eCoverageDefinition 7 Coverage Definition.
eFacility 8 Facility.
eGroundVehicle 9 Ground Vehicle.
eLaunchVehicle 10 Launch Vehicle.
eLineTarget 11 Line Target.
eMTO 12 MTO (Multi-Track Object).
eMissile 13 Missile.
eMissileSystem 14 Missile System.
ePlanet 15 Planet.
eRadar 16 Radar.
eReceiver 17 Receiver.
eSatellite 18 Satellite.
eScenario 19 Scenario.
eSensor 20 Sensor.
eShip 21 Ship.
eStar 22 Star.
eTarget 23 Target.
eTransmitter 24 Transmitter.
eFigureOfMerit 25 Figure of Merit.
eRoot 26 Root.
eAccess 27 Access.
eObjectCoverage 28 Coverage.
eAttitudeFigureOfMerit 29 Attitude Figure of Merit.
eAntenna 31 Antenna.
ePlace 32 Place.
eVolumetric 33 Volumetric

Example

Retrieve the list of scenario's children of a given type
[C#] Copy Code
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] Copy Code
Dim allChildrenOfType As IAgStkObjectElementCollection = root.CurrentScenario.Children.GetElements(type)

For Each o As IAgStkObject In allChildrenOfType
    Console.WriteLine(o.InstanceName)
Next

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1