• 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 C++ Tutorial

Messages
12
Hi,

since this is my first post on the forum, I would like to say "Hello" to everybody on the forum.

If this question has been posted before, don't get mad at me, because I already did a search on the forum, but couldn't find anything.

I am a C++ coder and would like to do my first steps with SimConnect. Basically, the first program should simply read out some data from FSX, like ownship data (lat, long, altitude) and display it on my GUI while I am flying. Since I have never really used the SDK before I am not really familiar with all these things. I am looking for a C++ tutorial showing me how to do it step by step. This would help me a lot to get started. Maybe a sample project which I can compile in VS2005 and just walk through.

I read the previous post of scruffyduck/Jon, but I dont know if C# is similar to C++, since I have never used it.

You help an guidance is appreciated a lot.

Peter
 
Try the samples in SDK\Core Utilities Kit\SimConnect SDK\Samples

George
 
Hi,

thanks for the answers so far. I will have a look at these samples first, before coming back with other questions, if required. ;)
 
Well, now I just need to get my SDK working. I installed it and followed exactly the Wiki on this site.

I am using SP1 and also installed the SP1a SDK. However, I still have no tools entry in options and also if I go to Start->programs->micosoft games, I just see the FSX and not the SDK with the tools etc. :confused:
 
Did you amend the dll.xml so your file is loaded by FSX? Post it here so we can look for any problems.

Regards
Simon
 
Hi Simon,

finally I found my problem. I knew that I have to do changes to the dll.xml, but only could find the one directly located in the FSX directory and in there the flags were already set false, but it was still not working.

Then I found another hint and it was saying that you have to go to Start->Run and in there type %appdata% and this led me in the right direction. I could find the correct dll.xml file, had to set all the flags to false and viola, the menues appeared, I could connect to FSX and I am already communicating via simconnect.

So time to explore the possibilities :)

Thanks all for your help!
 
So, after playing around with the samples for a while and looking at the SDK, I am still a little stuck.

I guess, there is no tutorial on how to setup a simple C++ application with all the necessary steps explained?!

I found things for C#, but it is a little different. I am having problems to understand, what steps are involved for the setup, why certain things are done and needed etc. The SDK is not telling me that. I can look at the samples of course and I did that, but there there are just very few comments. Well, I could just copy/paste that stuff and tweak it, but I would like to understand what I am doing and why I need to do it. :confused:
 
What parts are you having problems with specifically? The one thing to keep in mind is its really a C style API, not really a C++ interface.
 
All you need to do is start a project and set the compilation type to dll.

Then you just need to create a C file to house the top level gauge definitions. Into that you #include individual files for each specific gauge. (At least that's how most people do it.)

The best tutorial out there is Dai Griffith's. Go to Avsim and search for sd2gau27.zip and you should find everything you need. Some C programming experience and familiarity with Visual Studio helps tremendously though.

The most confusing thing about C gauges is the amount of macros used. To someone who's fluent in C and used to looking at everything procedurally, this can be really confusing to start with as it simply doesn't look like your regular C programs. Once you've dug around for while it'll all make sense though.

Si
 
It's great that you really like to help!

Well, for me it is not the problem if it is in C or C++, because I am able to code in both languages.

The harder part for me, I guess, is that it is the first time I really use an SDK and to understand what each function really does. Well, the examples give an intro picture, but sometimes for me the basic part is unclear.

For example it would be helpful if I would fully understand why you use the following things and what they are good for. I talk about:

  • Events
  • Groups
  • Inputs
  • Data Requests
  • Definitions
  • Objects

If I would have a clear understanding, what each of these are, what they do and why they are used, things would be more easy I guess.

Sorry, for these basic questions, but I would love get a clear picture.
 
I know these questions are very basic, but sometimes everything else is falling into place, once the topic gets kicked off.

Anyway, I can understand that those questions might not be suitable for this forum. Thanks for you help and answers so far. I will try to figure it out myself.
 
Back
Top