Regarding E:TIME OF DAY with PDK

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
BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Regarding E:TIME OF DAY with PDK

Post by BenBaron »

Hi guys,

can the variable "E:TIME OF DAY" which is referenced here: https://www.prepar3d.com/SDKv4/sdk/refe ... ables.html, be retrieved via PDK's GlobalDataService, like the other time variables on that page?

Didn't find a way to do so, so I am currently using PanelService's ExecuteCalculatorCode() method to retrieve it, but find it a but unintuitive.

All the best,

Benny
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: Regarding E:TIME OF DAY with PDK

Post by Clifton Crane »

Hi Benny,

There is a function called GetGeneralTimeOfDay. It is located in IGlobalData.Legacy.h which is the IGlobalDataV400 interface. You should still have access to it from the IGlobalDataV430 interface, however.

Hope this helps.
Clifton Crane
Prepar3D® Software Engineer Sr.
BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: Regarding E:TIME OF DAY with PDK

Post by BenBaron »

Thanks Clifton for the quick reply.

Indeed, it is working as you described. Maybe you can update the documentation on this matter, as there is only a notice on the SDK page, that P3D::IGlobalDataV430 inherits IGlobalDataV400, but not what IGlobalDataV400 exactly entails :).

Thanks for your help.

All the best,

Benny
Post Reply