August 13, 201510 yr Commercial Member Is it possible? The obvious answer is to check the 'Last_Accessed' attribute on the flt file but as the operating system can defer stamping that information to the file for up to an hour, it's not really a lot of use. Finding which flt file has just been saved is relatively easy as the 'Last_Modified' attribute is stamped within two seconds. As the flt file is really just an ini file, I'd like to use it to store additional panel information associated with that flight.
August 13, 201510 yr In FSUIPC it is possible via offset 0x3F04 ( both fs9 & fsx + ) For FSX and above this is done through simconnect so it should be possible without FSUIPC. FS RTWR SHRS F-111 JoinFS Little Navmap
August 13, 201510 yr The SimcConnect APIHRESULT SimConnect_RequestSystemState ( HANDLE hSimConnect, SIMCONNECT_DATA_REQUEST_ID RequestID, const char* szState ); where the null-terminated string szState identifies the system function: AircraftLoaded Requests the full path name of the last loaded aircraft flight dynamics file. These files have a .AIR extension. DialogMode Requests whether the simulation is in Dialog mode or not. See SimConnect_SetSystemState for a description of Dialog mode. FlightLoaded Requests the full path name of the last loaded flight. Flight files have the extension .FLT. FlightPlan Requests the full path name of the active flight plan. An empty string will be returned if there is no active flight plan. Sim Requests the state of the simulation. If 1 is returned, the user is in control of the aircraft, if 0 is returned, the user is navigating the UI. Gerry Howard
August 13, 201510 yr Author Commercial Member Thanks guys. I'm pleased to see that it can be done 'natively' because I'm desparately trying to avoid the use of any third-party addon for this project. We'll see if I succeed... :smile:
August 13, 201510 yr Commercial Member Just a word of caution... Prepar3D v2.5 has panel state saving built in... might want to look into that before someone shoves your project into that and things get crossed. Ed Wilson Mindstar AviationMy Playland - I69
August 14, 201510 yr Author Commercial Member Thanks Ed. Actually, BIG thanks Ed because I was aiming for cross-compatibility!
Create an account or sign in to comment