I can't set "KOHLSMAN SETTING MB" simvar

I’m trying set this simvar: “KOHLSMAN SETTING MB” within simvar watcher.
While the documentation say it is writable, it always give me a data_error.
Anyone could either confirm or tell me if im doing something wrong ?

In air manager I use “KOHLSMAN SETTING HG:1”, “inHg”

According to the SDK doc, KOHLSMAN SETTING HG is not writable.
I’ve tried it just in case, and I get the same data_error when trying to write a value for it.

Sorry that is how I read it.
I use fs2020_event(“KOHLSMAN_SET”,(baro_code)).

baro_code is the name of the variable I use

Kohlsman is a variable that can’t be written to. Instead you have to use an event. A sample call in C#:


Feel free to take a look at my code: GitHub - kenz67/FlightSim-AircraftState: Read and save MSFS aircraft state and apply to next flight

There is a class SimConnectService.cs that has all of the calls to get/set various values from the Sim. Basically you need to declare an enum with the events you want to send, then make a call to map your event to a sim event, then make the call above to send the event which will update the setting in the sim

Thanks, I’ll have a look for sure. The thing that is confusing is that according to the SDK, “KOHLSMAN SETTING MB” is writable.

I have compiled your code be there seems to be an issue with the simconnect.
I get System.BadImageFormatException: ‘Could not load file or assembly ‘Microsoft.FlightSimulator.SimConnect, Version=11.0.62651.3, Culture=neutral, PublicKeyToken=baf445ffb3a06b5c’ or one of its dependencies. An attempt was made to load a program with an incorrect format.’

Trying to find out why exactly. I can confirm the sinconnect dll are in the same folder of the executable.

Edit : NVM fixed, changed from AnyCPU to x64 when building.