PDK (API) Engine System (IEngineSystem) Development Sample not working

Any issues, problems or troubleshooting topics related to the Prepar3D website and web apps.
Post Reply
keilyn6
Posts: 8
Joined: Wed Jan 04, 2023 7:31 pm

PDK (API) Engine System (IEngineSystem) Development Sample not working

Post by keilyn6 »

I am attempting to use the Engine System Development Sample to create a
custom engine implementation for the Mooney Bravo aircraft. In the
instructions, it has directed me to include in the Aircraft.cfg file These
lines In the [GENERALENGINEDATA] section of the file for the desired plane.


EngineSystem = {bc95b363-1d22-42aa-82b1-f10905b22c40}
engine_type = 2

(the guid and the engine type 2 meaning don't use regular engine
implementation)

I have built the MyEngine.sln and added the folder to the Prepar3D Add-ons,
as well as enabling it in prepar3D. When loading up the simulation with the
Mooney Bravo, the plane's engine is off and nothing happens. I am also
unable to turn the engine on manually (ctrl + E). Please let me know if I
am doing something wrong, or if extra steps need to be taken in order to
use this API feature.
Mike Schroeter
Lockheed Martin
Posts: 341
Joined: Thu Jan 12, 2012 7:05 pm

Re: PDK (API) Engine System (IEngineSystem) Development Sample not working

Post by Mike Schroeter »

Be sure the compiled .DLL is being loaded. The SDK has more detailed information on configuring add-ons, but basically the addon package needs to be either placed in you My Documents "Prepar3D v5 Add-ons" or specified in the C:\ProgramData\Lockheed Martin\Prepar3D v5\add-ons.cfg file.

Hope this helps,
Mike
keilyn6
Posts: 8
Joined: Wed Jan 04, 2023 7:31 pm

Re: PDK (API) Engine System (IEngineSystem) Development Sample not working

Post by keilyn6 »

Thank you for replying!

I have placed the sample folder with the .DLL in it, in the documents folder and it seems like the .DLL is being loaded. I am confident of this because, I have created an output file (txt file) that the source.cpp program writes to if it is getting to certain places in the code. The DLL start method is being called and the MyEngineFactory constuctor is being called and created. For some reason, the CreateEx() method is not being called, which I believe is causing the MyEngine object to not be created. I hope this makes sense.
Post Reply