• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 SimConnect or PDK, advantages and disadvantages

Messages
20
Country
germany
Hi guys,

for a new development project (in process-dll in C++) we will have to decide on whether we go down the SimConnect or PDK path.

While I am quite ok with SimConnect and it's workings, PDK is completely new to me, so skimming through it's documentation looks like it's going to be quite a steep and also time consuming learning curve. So, apart from the fact, that the PDK-approach is only working for projects designed to be in-process dlls and automatically excludes FSX support, are there any cristal clear advantages in using PDK over SimConnect? Is there anything that cannot be done with SimConnect but is possible with PDK?

I would be especially interested in the possibility of driving custom animations on specific instances of SimObjects using PDK without relying on global LVARs. To me, this now would be a, if not the only major reason to make the switch to PDK.

So, I am thankful for your opinions on the matter.

Greets, Benny
 
Messages
87
Country
russia
Hi Benny.

Advantages of both are well described in overview of PDK and SimConnect.
I think that PDK gives much more power for SimObjects creation, custom systems simulations and interconnections. Look at the Weapon system, that is based on PDK capabilities. Guess that PDK was developed to expand sim with such complicated systems. I'm not an expert in LVARs and XML. PDK gives you possibilities to create Properties and Events for SimObjects and Simulations instances. After registration this variables can be used like Simulation Variables in gauges (including XML), animations, scenario scripts and missions. By the way, you can call SimConnect functions inside PDK dll, when you need it.
 
Messages
20
Country
germany
Thank you for your thoughts...will take them into consideration and guess I will try to make myself comfortable with the PDK.

Greets, Benny
 
Messages
578
Country
france
@Prepar3DGuy
hello
I'll make my first ever C++ PDK project tomorrow and I was reading some SDK docs.
in my project, I need to create some variables that can be accessed through LUA scripts
my question is: should I create a simobject instance to create those custom variables ?
are they registered as L vars or C vars?

and one last question: I want also to include a simconnect app (C#), is the event system used by simconnect linked to the PDK ? as i want to pass some information to my module through events
thnx in advance :)
 
Messages
87
Country
russia
Hi RED COOL.
As I know, in PDK you can register custom Properties and Events callback for that properites which can be accessed via scripts and SimConnect clients for:
1. SimObjects (using ISimObjectManager for a class of SimObjects or using IBaseObject interface for the instance of existing SimObject that you have access);
2. Your ISimulation implementation (using ISimObjectManager). It must be registered for some SimObject.
3. Panels using IPanelSystem.

Why not to use SimConnect inside you PDK module?
Custom services that registered using Pdk (separate modules) have access to each other using IQueryService interface of IPdk reference they have received on DLLStart. You can make data exchange with external process (application) using SimConnect or your own methods.
 
Messages
578
Country
france
i found out that working with ISimobject is a bit hard (beginner perspective) more complex than simconnect :p
for the unique Guid needed, how can i get it ? i found that the PDK sample uses some kind of numbers with x stuff (0x56...) ?

and what about the IUknown how do i get them


and one last confusing question , when is DLLStop called ? at P3D close or right after DLLStart ?
 
Messages
87
Country
russia
It's not hard but powerfull.
For GUID (Global Unique IDentifier) generation use GUIDGenerator.exe in SDK folder or from the Visual Studio menu Tools->Create GUID :p
About IUknown and other stuff look for COM (Component Object Model) documentation and tutorials 1, 2. Actually you need to know the basics of interfaces, services query, smart pointers and reference counters.

P3D call DLLStart when system that look for addon.xml files load you dll module. DLLStop will be called by P3D when it's clossing (after you select exit and before P3D actually closed, to be more exact when PDK system are unloading). Your dll module will be in memory all the time P3D is running.
 
Last edited:
Messages
87
Country
russia
For the slow dive into PDK with examples I recommend (by increasing complexity): DataHarvester -> CustomPDKObjects -> CameraPDK -> SimpleCar -> SimpleAirplane -> Engine -> RadarAltimeter ...
First three of them are not SimObjects but global plugins.
 
Messages
578
Country
france
thank you i'll take a look into them
my project needs the DLL for one simple task is creating variables and setting them but i see it gets deeper so I'll enjoy learning to expand my P3D knowledge :)
 
Messages
917
Country
indonesia
Hi guys,

for a new development project (in process-dll in C++) we will have to decide on whether we go down the SimConnect or PDK path.

While I am quite ok with SimConnect and it's workings, PDK is completely new to me, so skimming through it's documentation looks like it's going to be quite a steep and also time consuming learning curve. So, apart from the fact, that the PDK-approach is only working for projects designed to be in-process dlls and automatically excludes FSX support, are there any cristal clear advantages in using PDK over SimConnect? Is there anything that cannot be done with SimConnect but is possible with PDK?

I would be especially interested in the possibility of driving custom animations on specific instances of SimObjects using PDK without relying on global LVARs. To me, this now would be a, if not the only major reason to make the switch to PDK.

So, I am thankful for your opinions on the matter.

Greets, Benny

it depend on what the target purpose.
PDK is more wider capabilities than SimConnect.
 
Messages
578
Country
france
@Prepar3DGuy
I tried to make my own simobject using the learning center docs and the simple car sample, i get many errors and every time i fix some (copy-paste :p) others get out
Is there a way to create Lvars or C vars and set them without making a simobject ? just a general module?

if not, can you show me how to make a simple simobject class, i can't get mine to work at all
first time with C++, i got used to C# but i'm doing good with it :)
thnx in advance

EDIT: every forum is saying the PDK is very complex while i only need two functions : Variables creation/Read/Write and Event Send/Receive and the rest can be done using simconnect
 
Last edited:
Top