C2xLoadRoute
CAPL Functions » Car2x » C2xLoadRoute Valid for: CANoe DEFunction Syntax
Description
This function loads the route with the name routeName from the file specified by routeFilePath parameter and adds it to the currently loaded scenario. Note- Available file formats are nmea, gpx, and kml.
- The route names in the file depend on the file format:
- .nmea: name is the same as filename
- .gpx: name is same as the trk-name given in file
- .kml: name is same as the Placemark-name given in file
- The configuration as a loop should be physically plausible. This includes the distance between end and start point of the loaded route as well as the heading difference. For example, stations driving on the route cannot change their heading by 90° while driving at high speed etc.
Parameters
- routeFilePath: The path to the route file, e.g., c:\SomeFolder\TestRoute.gpx. The relative file paths are also accepted with relation to CANoe DE product configuration folder.
Return Values
- 1: Success
- -1: Route loading error or invalid routeFilePath parameter.
- -2: Route cannot be loaded as route with the same name already exists.