• 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.

Simconnect using C#.NET

Messages
2
Country
pakistan
Hello,
I am a complete beginner in FSX and use C#.NET occasinally but not actually a serious programmer....
I basically want to get data in and out from FSX and through research i came to know its through SDK simconnect...but i cant get any related help for beginner that how to get started with this sdk...
i have installed the sdk from the FSX Deluxe CD but i actually dont know how to use simconnect in visual studio. net 2008 like how do u refer the simconnect dlls for a windows form project...
Can anyone refer me a tutorial or tell me the steps here for using simconnect in C#.net....
 
Did you check the examples in the SDK folders? There are some good explained solutions for C# and VB.NET.

Rgds
Speedbird
 
The SP2 SDK contains some really good examples for C# forms.

Here's the C# source code for TCalcX:

TCalcX_003_source.zip

It's in the VS2008 express solution format, so it should work for you by simply opening the Solution ( .sln ) file in your VS2008.

Note that it is set to compile as x86... this insures that 64-bit systems will recognize it as x86 code. Also, it uses the RTM simconnect dll, which all endusers should have on their systems. ( Never delete a SxS version of a dll from your computer).

TCalcX uses a 'timer'... that is it's a polling technique.

The Aces do not recommend using polling techniques... they recommend querying data packets only when needed, and their examples show this.

Polling will eat up time, as it gathers data unneccessarily as the program simply idles. But for scenery development, it works very well, as we usually work in SLEW mode.

+++++++++++++++++++++++++++++++++++++++

In VS2008 Express, you would add the reference to the RTM simconnect by looking in the 'Solution Explorer' window, then right-clicking the 'References' menu heading... then select 'Add Reference...'

In the pop-up Reference window, select the 'Browse' tab, and navigate to:

C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\LegacyInterfaces\FSX-RTM\Microsoft.FlightSimulator.SimConnect.dll

If you want to use the SP2 Simconnect version, navigate to:

C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\lib\managed\Microsoft.FlightSimulator.SimConnect.dll



Dick
 
Last edited:
Back
Top