• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Simple C # program help

Messages
12
Country
brazil
Good morning, I'm losing my hair trying to send a simple event or read variables by simconnect and C #.
Would someone have a very simple project with just one button to send and a label to read a variable?
 
If this question is for the new sim, I don't know.

Otherwise, the SDKs for the others have managed code samples in them that should get you started, for example, the Managed Data Request.
 
The SDK samples from FSX and the P3D v1.4 should work (for the most part) in MSFS. And these should be able to reference the MSFS version of SimConnect, if you want to compile them that way.
 
You need the cfg to run Simconnect from a remote PC, you don't need it to run local.
FS2020 Managed Simconnect needs the Simconnect.dll to be present in your program folder (not sure why - the Managed dll is supposed to be self-contained. P3D and earlier FSX managed dlls did not require it.)
You only need to add the reference to the managed dll to your project (Microsoft.FlightSimulator.SimConnect or LockheedMartin.Prepar3D.SimConnect as appropriate)

P3D Simconnect has a different name, so you can include both P3D and MSFS connections in the same project. Although there is a caveat: you can't mix 32-bit and 64-bit versions of SimConnect. So it's ( MSFS + P3Dv5 - 64-bit) or ( FSX + P3Dv4 - 32-bit). That may not be important to you, but if you're writing an app that targets multiple sims, it's something to be aware of.
 
Thank you very much, it worked perfectly, the only problem is the drop in fps when using simconnect. But I believe that they will solve this problem one day
 
Back
Top