Skip to main content
Open topic with navigation

CAPL Functions » ADAS » GetStationAttributeDouble

GetStationAttributeDouble

Valid for: CANoe DE Note: This CAPL function is also available as C# function.

Function Syntax

C#
double GetStationAttributeDouble.Call(string stationName, string attribute);
CAPL
double GetStationAttributeDouble.Call(char[] stationName, char[] attribute);

Description

Queries an attribute of a scenario as a value of type double at the runtime of the scenario.

Parameters

  • stationName: The name of the station from which the attribute shall be got.
  • attribute: The name of the attribute which shall be got. Available default (double) attributes:
    • Latitude
    • Longitude
    • Heading
    • Elevation
    • Acceleration
    • Length
    • Width
    • Height
    • Distance
Further user-defined attributes can be created in the Scenario Editor timeline.

Return Values

C#
  • The value of the attribute.
  • 0: The value of the attribute cannot be found.
CAPL
  • The value of the attribute.
  • 0: The value of the attribute cannot be found.

Example

In the examples it is assumed in each case that a DO object of the type IScenarioManager was created.

CAPL

double latitude = ScenarioManager.GetStationAttributeDouble.Call("DuT", "Latitude");

C#

double latitude = ScenarioManager.GetStationAttributeDouble.Call("DuT", "Latitude");