poISubcase GetDerivedSimulationIndex

Returns the index of the simulation in the original subcase which was used to create this particular simulation (simidx) of the derived subcase.

Syntax

subcase_handle GetDerivedSimulationIndex simidx

Application

HyperView Tcl Query

Description

This command returns the index of the simulation in the original subcase which was used to create this particular simulation (simidx) of the derived subcase.

Inputs

simidx
The simulation index within the derived subcase.

Example

hwi OpenStack
hwi GetSessionHandle session_handle
session_handle GetProjectHandle project_handle
project_handle GetPageHandle page_handle [project_handle GetActivePage]
page_handle GetWindowHandle window_handle [page_handle GetActiveWindow]
window_handle GetClientHandle client_handle
client_handle GetModelHandle model_handle [client_handle GetActiveModel]
model_handle GetResultCtrlHandle result_handle
set scid [result_handle AddSubcase];

result_handle GetSubcaseHandle subcase_handle $scid
subcase_handle SetDerivedType "superposition"
subcase_handle AppendSimulation 3 0;
subcase_handle AppendSimulation 4 1;
set a1 [subcase_handle GetDerivedSimulationIndex 0];
set a2 [subcase_handle GetDerivedSimulationIndex 1];


# The variable a1 will have a value of 0 and the variable a2 will have a value of 1
hwi CloseStack

Errors

Returns -2 if an invalid simulation index is passed.