can PdkServices be invoked from processes other than P3ds?

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
mer
Posts: 25
Joined: Fri Aug 31, 2018 10:52 am

can PdkServices be invoked from processes other than P3ds?

Post by mer »

Hello,
Is there any way to access scenario and environment parameters of Prepar3d (such as global temperature,visibility etc) by invoking PDk's services from outside of Prepar3d?
Normally we write plugins with DLLStart and stop methods that Prepar3d calls. If we want a console application or some other caller, how can we expose these services to them?
Thank you
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: can PdkServices be invoked from processes other than P3ds?

Post by Clifton Crane »

Hi mer,

Currently the PDK pointer is only available to DLL's such as PDK plugins or gauges.

However, it should be possible for your executable to be able to communicate with a PDK based DLL using SimConnect calls such as SimConnect_CreateClientData and SimConnect_SetClientData.

This would allow an external application to transmit data to a PDK based C++ plugin over SimConnect where the plugin could then pass data to/from P3D.
Clifton Crane
Prepar3D® Software Engineer Sr.
MicMac44
Posts: 25
Joined: Fri Feb 15, 2019 5:48 pm

Re: can PdkServices be invoked from processes other than P3ds?

Post by MicMac44 »

Clifton Crane wrote: Mon Oct 01, 2018 7:52 pm
However, it should be possible for your executable to be able to communicate with a PDK based DLL using SimConnect calls such as SimConnect_CreateClientData and SimConnect_SetClientData.

This would allow an external application to transmit data to a PDK based C++ plugin over SimConnect where the plugin could then pass data to/from P3D.
I know it's been awhile since this post was made so hopefully you can dust off the cobwebs! I'm wondering how specifically you would grab the data in the PDK add-on after setting the client data in a SimConnect project?
JB3DG
Posts: 609
Joined: Mon Jan 09, 2012 6:44 pm

Re: can PdkServices be invoked from processes other than P3ds?

Post by JB3DG »

The dll with the PDK integrated would require a SimConnect instance which would request notifications if changes are made to the client data area.
Jonathan Bleeker
Milviz systems dev

Formerly known as Naruto-kun
MicMac44
Posts: 25
Joined: Fri Feb 15, 2019 5:48 pm

Re: can PdkServices be invoked from processes other than P3ds?

Post by MicMac44 »

Do you have an example I could look at that demonstrates how to request those notifications?
Post Reply