plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

Idea

IcemanFBW avatar image
IcemanFBW suggested Martin_CaronStudios published

Support strings and structs in LVars, and allow reading/setting LVar's and H-events over SimConnect

Currently, only double data types are officially supported in local simvars (Lvars). There needs to be a more efficient way to relay data between WASM gauges as well as to/from WASM and JS gauges. Supporting string and custom defined struct datatypes as lvars would be a huge plus.


Also, being able to read/write lvars and trigger h-events from external SimConnect clients would be helpful.

simconnectgaugeswasm
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

virtuali avatar image
virtuali commented

Agreed, this is very important, and might prevent the unneeded proliferation of dozen of almost identical WASM modules, all doing the same thing: calling the Gauge api and use Simconnect client areas to extract data for external .EXE clients.

1 comment
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Yeah - this is definitely what's happening at the moment (I've had to write custom modules for hardware to interface with the A32NX), and the last thing we want to happen is for these multiple modules to affect performance for the end user.


I believe I brought this up to Asobo some months ago, and they mentioned that the challenge on their end lies with specifying the simobject that's being talked to for LVars, but when it comes to standalone WASM modules, specifying the simobject isn't necessary... so perhaps this isn't as much of a barrier to implementation as previously thought?


0 Likes 0 ·
MobiFlight avatar image
MobiFlight commented

I have created the MobiFlight WASM module for MobiFlight to be able to access the A-Vars, L-Vars and trigger all kinds of events and code. I was probably the first who published it, including its sources (https://github.com/Mobiflight/MobiFlight-WASM-Module).

I would propose to consider rebuilding the SimConnect API for data access and allow for a more modern and stable way to interact with the Sims Data. This could be so powerful!

I understand there is a myriad of tools that have grown over the past decades that can interface with SimConnect. This definitely explains why we would want to have SimConnect for these legacy tools.

in my opinion, it took way too much effort to be able to read and write all the data and it is a HACK for sure.

It's 2021 and the home cockpit builder and also tools community deserves to get an API that looks like it is from this decade (REST, Websockets, or so). I am happy to help you with it.

1 comment
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

I love your WASM module and agree with everything you put here. I really hope MS/Asobo will step up SimConnect, but for the meantime thank you very much for giving us this workaround.
0 Likes 0 ·
Martin_CaronStudios avatar image
Martin_CaronStudios commented

I'm using the wonderful MobiFlight WASM module and a Python extension to read and write L:vars in MSFS Mobile Companion App. You can have a look at the source code on the GitHub project page here: https://github.com/mracko/MSFS-Mobile-Companion-App

I hope this helps - at least until it's natively supported by SimConnect.

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Martin_CaronStudios avatar image
Martin_CaronStudios commented Martin_CaronStudios published

I'm using the wonderful MobiFlight WASM module and a Python Extension to read and write L:Vars in MSFS Mobile Companion App. You can have a look at the source code on the GitHub project page here: https://github.com/mracko/MSFS-Mobile-Companion-App

I hope this helps, at least for now until it's natively supported by Simconnect.

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write a Comment

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.