SimConnect_RequestSystemState(AircraftLoaded) returns partial path of aircraft.cfg

SimConnect_RequestSystemState(AircraftLoaded) returns partial path of aircraft.cfg
for example, will get
“SimObjects\Airplanes\Asobo_Baron_G58\aircraft.CFG”

but
SimConnect_SubscribeToSystemEvent(AircraftLoaded) returns full path of aircraft.cfg

for example, will get

“F:\MyChosenFolder\Packages\Official\OneStore\asobo-aircraft-baron-g58\SimObjects\Airplanes\Asobo_Baron_G58\aircraft.CFG”

these two AircraftLoaded APIs get an inconsistent file path.

the problem is if you simconnect a little bit late, you have missed the chance to receive the event from SimConnect_SubscribeToSystemEvent(AircraftLoaded).
Alternatively, you have to use SimConnect_RequestSystemState(AircraftLoaded) , but you get only partial file path.

it is a big pain to get inconsistent file path

3 Likes

The full path is not much use as you cannot access the host filesystem, and you’d have to try figure out the VFS path from it. SimConnect_SubscribeToSystemEvent should also give a VFS path ideally.

+1 for getting this bug fixed.

essentially the RequestSystemState(AircraftLoaded) seems only useful to get a unique string for the aircraft (although the SimObjects\Airplanes\ and \aircraft.cfg parts are redundant).

Congrats to the OP for the total hack directory search workaround. What I was thinking of was to accumulate a persistent cache of aircraft filepaths from the SubscribeToSystemEvent(AircraftLoaded) so when the RequestSystemState(AircraftLoaded) partial path comes in I can look it up in there. This fails if the first ever load for a plane is the partial path and in that case I’d ignore the event.

i’m guessing MS/Asobo returning the full filepath would be less work though.

1 Like

Maybe not from WASM but from an external privileged app one can access anything.

That is true, and could have been workable in MSFS2020, but I think no more with streaming in MSFS2024.

The “streamed” files still have to end up somewhere, right? But anyway there are going to be locally installed models, right? Or do I have to upload all my content to MS servers first so I can d-load it again? :slight_smile: (And no I wouldn’t be terribly surprised if that was actually a thing, at this point.) In that case SimConnect should send URL paths!

There’s just no guarantee that any given file would be on the local machine at any given time is my point really. Unless there was some API to lock it in the local cache I don’t see how that would work.

Exactly.
For me RequestSystemState return this: SimObjects\Airplanes\asobo_c172sp_g1000\presets\asobo\c172sp_avionics_cargo\config\aircraft.CFG

but on my system I only have : SimObjects\Airplanes\asobo_c172sp_g1000\common\

no prests folder. So where tf is the aircraft cfg located ?
Community or official folders ? nope.
streamPackages ? nope.