Utility Functions and C Language Reference > Utility Functions: Java (lr.) > Alphabetical Listing > lr.get_scenario_id

lr.get_scenario_id

Returns the id of the current scenario or session step.

Java Language

int lr.get_scenario_id ( ); 
Example: lr.get_scenario_id Informational Functions

The lr.get_scenario_id function returns the id of the current scenario or session step.

To access the scenario ID, add the scenario attribute to the Run-Time Settings. Add scenario to the Additional Attributes on the General tab. If the scenario attribute is not added to the Run-Time Settings, the scenario ID is always zero (0).

Return Values

Returns the id of the current Scenario or Session step. If no ID number is available (for example, there is no active Scenario or Session step) it returns -1. The return value is a pointer to static data and should only be read, not altered.

Parameterization

Parameterization is not applicable to this function.