• 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_DATA_FACILITY_AIRPORT in FS2024 has broke backward compatability

Messages
46
Country
israel
I have a problem here in a managed c# app.
The Ident field changes its size from 6 to 9. I need a way to correctly get the fields of an airport, based on the sim version. I can detect the version, but I always get a 2024 SIMCONNECT_DATA_FACILITY_AIRPORT - which means the Ident is 9 instead of 6, and the other fields are broken because of the offset.
Any ideas?
 
As I explained earlier, SimConnect is not backwards compatible. If you want one version of your app for both sims then use the FS20 SimConnect. As explained in the dev forums link I provided, when FS24 detects it is talking to an FS20 SimConnect, it will send a 6 char ident.

If you need the 3 extra chars of the ident that FS24 provides, then you'll need separate versions of your app, built against different SimConnect libs, one for FS20 and another for FS24.

Anything with a name that you map to your own ID, like sim vars or events, will still work on FS24 with a FS20 SimConnect. They even work with FSX-era SimConnect.

-Max
 
Yes well. The problem is that I need the Livery simvar in msfs2024 but then when I use the 2024 sdk, the airport facility data is broken because it marshals it with the 3 extra chars.
I am trying to avoid two builds, as people use both versions.
So its not backwards compatible but its also not forward compatible - not with managed code at least...
 
I need the Livery simvar in msfs2024
The sim var is a named variable, right? You can read it with _any_version of SimConnect. Just think of L vars... they may or may not exist at any particular time. SimConnect doesn't keep an internal list of all possible names on the client side, it asks the sim about them.

but its also not forward compatible - not with managed code at least...
There's no difference with managed code or C[++]. It _is_ "forward compatible", but there's no way the older version will know about new version features, like the extra 3 chars of ident in this case. But as I said this doesn't matter for anything named.
 
Maybe I am not explaining myself correctly, or I am missing something.
How would I read the result of SimConnect_RequestFacilitesList_EX1 correctly? The extra 3 bytes create a bad mapping to the struct so lat/lon are incorrect.
I tried defining and using my own structs instead, but simconnect ingnores that and always returns the built in simconnect_data_facility_airport type, and I cannot marshal it to my own as it's an object array of this type.
On the other hand, using the 2020 sdk, I cannot call for object data on the LIVERY simvar. It just doesn't work.
 
Yes, "LIVERY NAME".
It seems to have worked. I just changed to 2020 sdk, and I call LIVERY NAME as before and it works.
I am just making sure the SIMCONNECT_DATA_FACILITY_AIRPORT works as expected now on both sims.
Thanks!
 
Back
Top