Author Topic: How can I find out programatically whether GSX is enabled in the P3D menu?  (Read 2244 times)

Ebertr

  • Newbie
  • *
  • Posts: 18
Currently I'm implementing GSX into my B737 flightdesk. Services, like catering, boarding, etc. will be initiated by the flight plan, according to the depature time. This requires that all involved applications are in a ready state. Now to my question: How can I find out programatically whether GSX is enabled in the P3D menu? Because this seems not to be possible via one of the published GSX LVars.

Thanks in advance!

Ruediger

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50659
    • VIRTUALI Sagl
What do you mean with "enabled in the P3D menu" ?

If you mean enabled through the default Options->Addon menu of the sim, you can check its status like any other addon, by checking its entry under both

%PROGRAMDATA%\Lockheed Martin\Prepar3d v4\add-ons.cfg
%APPDATA%\Lockheed Martin\Prepar3d v4\add-ons.cfg

And check the "ACTIVE" status of that file for the Addon Manager entry.

You need to check both locations, since it might be in either, depending how the sim was uninstalled/reinstalled and if auto-discovery of addons was used or not.

However, this will only tell you if the Addon Manager is enabled, which might not necessarily mean GSX is enabled, since the Addon Manager might be running even if you only install a single FSDT scenery, not using GSX.

If, instead, with "enabled" if you mean it hasn't been disabled from the GSX sub-menu under the "Addons" menu of the sim, then you can check this file:

%APPDATA%\Virtuali\Couatladdons.INI

and check the value of the "disable" parameter under the [GSX] section of the .INI file. If it's 0, it means GSX hasn't been disabled from that menu.

Ebertr

  • Newbie
  • *
  • Posts: 18
If, instead, with "enabled" if you mean it hasn't been disabled from the GSX sub-menu under the "Addons" menu of the sim, then you can check this file:

%APPDATA%\Virtuali\Couatladdons.INI

and check the value of the "disable" parameter under the [GSX] section of the .INI file. If it's 0, it means GSX hasn't been disabled from that menu.

Perfect, that is what I was looking for :-)

Thanks!

Ruediger