Reading Environment variables via SDK

Version: Online SDK documentation as of 27 Dec 2023, 1.35.21.0

Frequency: Consistently

Severity: High

Context: On page Programming APIs in section Environment Variables

Bug description:

On page Programming APIs in section Environment Variables there is the following sentence:

You can access the following environment variables using the E: identifier in RPN, and also through the SimConnect SDK.

Please add to this sentence that when you want to read these variables via SimConnect SDK in C++, you DO NOT have to add the E: identifier. This information would have saved me a lot of time when I created my program.

If I tried this: hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_ABSTIME, "E:ABSOLUTE TIME", "Seconds", SIMCONNECT_DATATYPE_FLOAT64); then I got a NAME NOT RECOGNIZED exception in the SimConnect Inspector tool in Devmode.

The correct code turned out to be hr = SimConnect_AddToDataDefinition(hSimConnect, DEF_ABSTIME, "ABSOLUTE TIME", "Seconds", SIMCONNECT_DATATYPE_FLOAT64);

2 Likes

@Nocturne FYI