AGI STK X 11Send comments on this topic.
ExecuteMultipleCommands Method (AgSTKXApplication)
See Also
ConnectCommands
an array of Connect commands.
EAction
Bitmask specifies flags used to control the behavior of the method when an error occurs
while executing a command. Sometimes it is desirable to stop the batch processing immediatelly
or continue running the remaining commands in the batch.
Windows






Windows & Linux

Description

Allows the batch processing of multiple connect commands.

HRESULT ExecuteMultipleCommands(
[in] SAFEARRAY(VARIANT)* ConnectCommands,
[in] enum AgEExecMultiCmdResultAction eAction,
[out, retval] IAgExecMultiCmdResult** ppResult);

Syntax

[Visual Basic .NET]
Public Function ExecuteMultipleCommands( _
    ByVal ConnectCommands As System.Array, _
    ByVal EAction As AgEExecMultiCmdResultAction _
) As AgExecMultiCmdResult
[C#]
public AgExecMultiCmdResult ExecuteMultipleCommands(
    System.Array ConnectCommands,
    AgEExecMultiCmdResultAction EAction
);
[Managed C++]
public: AgExecMultiCmdResult^ ExecuteMultipleCommands(
    System::Array ^ ConnectCommands,
    AgEExecMultiCmdResultAction EAction
);
[Java]
public AgExecMultiCmdResult executeMultipleCommands(
    VariantArray ConnectCommands,
    AgEExecMultiCmdResultAction EAction
);
[Unmanaged C++]
public: HRESULT ExecuteMultipleCommands(
    SAFEARRAY * * ConnectCommands,
    AgEExecMultiCmdResultAction EAction,
    AgExecMultiCmdResult ** ppResult
);

Parameters

ConnectCommands
an array of Connect commands.
EAction
Bitmask specifies flags used to control the behavior of the method when an error occurs
while executing a command. Sometimes it is desirable to stop the batch processing immediatelly
or continue running the remaining commands in the batch.

Return Type

ppResult - upon return, contains a pointer to the IAgExecMultiCmdResult object. Instances of IAgExecMultiCmdResult allow users to access the status and results of each command.

See Also

Example

[C#]
System.Array commands = new object[]{ "New / */Satellite ERS1", 
"New / */Satellite/ERS1/Sensor sens1", "AllInstanceNames /" };
AGI.STKUtil.AgExecMultiCmdResult results =
stkRoot.ExecuteMultipleCommands(ref commands,
AGI.STKUtil.AgEExecMultiCmdResultAction.eContinueOnError);

for (int i = 0; i < results.Count; i++)
{
Console.WriteLine("command " + i + " succeeded " +
results[i].IsSucceeded);
}
[Visual Basic .NET]
Dim commands(2)
commands(0) = "New / */Satellite ERS1"
commands(1) = "New / */Satellite/ERS1/Sensor sens1"
commands(2) = "AllInstancesNames /"

Dim results As AGI.STKUtil.AgExecMultiCmdResult
results = AgUiAxVOCntrl1.Application.ExecuteMultipleCommands(commands,
AGI.STKUtil.AgEExecMultiCmdResultAction.eContinueOnError)

For Each res As AGI.STKUtil.AgExecCmdResult In results
Console.Write("command succeeded: ")
Console.WriteLine(res.IsSucceeded)
Next res
© 2019 Analytical Graphics, Inc. All Rights Reserved.