Share this page

# lr.get_scenario_id

Returns the id of the current scenario or session step.

    int 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 runtime settings. Add scenario to the Additional Attributes on the General tab. If the scenario attribute is not added to the runtime 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.

## Example

In the following example, lr.get_scenario_id retrieves the id of the current scenario or session step.

    int scenario_id = lr.get_scenario_id( );

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: