Search found 25 matches
- Tue Nov 24, 2020 6:36 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: FCS Targeting and DIS entities
- Replies: 8
- Views: 29403
Re: FCS Targeting and DIS entities
So after some digging I found this topic: https://www.prepar3d.com/forum/viewtopic.php?t=131939 They initialized the PDK by including "gauges.h" and the following code P3D::IPdk* pIPdk = nullptr; query_pdk(P3D::IID_IPdkV01, (void **)&pIPdk); I got my code to compile but crashes when it...
- Tue Nov 17, 2020 4:53 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: FCS Targeting and DIS entities
- Replies: 8
- Views: 29403
Re: FCS Targeting and DIS entities
Hi MicMac44, I believe calling PdkServices::Init outside of DLLStart will work as long as you have a valid IPdk pointer to provide it. PdkServices is essentially a wrapper class that queries and provides getters for the various PDK services. As long as the IPdk pointer is valid I think it should wo...
- Tue Nov 17, 2020 4:11 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: FCS Targeting and DIS entities
- Replies: 8
- Views: 29403
Re: FCS Targeting and DIS entities
Hi MicMac44, The entities created by DIS are SimObjects, so you should be able to access their simulation variables through SimConnect. At the moment, we do not have DIS specific simulation variables, such as site, application, or DIS entity ID. You would still need to use the PDK to get these DIS ...
- Mon Nov 16, 2020 10:52 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: FCS Targeting and DIS entities
- Replies: 8
- Views: 29403
Re: FCS Targeting and DIS entities
Hello, I believe you may be looking for GetEntityIdByObjectId() (or GetObjectIdByEntityId()) which can be found here: https://www.prepar3d.com/SDKv4/sdk/pdk_api/service_providers/group__isim.html#ae2c0b2218820ab67db925b6a41e91f21 Regards, Brady Thank you! That did the trick. Another question: Can S...
- Fri Oct 25, 2019 6:40 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: FCS Targeting and DIS entities
- Replies: 8
- Views: 29403
FCS Targeting and DIS entities
Using the in-game "Weapons Gauge" window, I am able to target DIS entities. With that, it also looks like the sim is grabbing relevant spatial information about that DIS entity (LLA to calculate distance and altitude, etc...). When I try to use the SDK to access FCS information, it seems l...
- Fri Oct 25, 2019 6:30 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: I cant get the IDISManagerV450.
- Replies: 6
- Views: 22279
Re: I cant get the IDISManagerV450.
Clifton,
Thanks for the response! I rolled it back to IDISManagerV440 and it's working smoothly now.
Thanks for the response! I rolled it back to IDISManagerV440 and it's working smoothly now.
- Thu Oct 24, 2019 5:25 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: I cant get the IDISManagerV450.
- Replies: 6
- Views: 22279
Re: I cant get the IDISManagerV450.
Code: Select all
PdkServices::Init(pPdk);
CComPtr<IDISManagerV450> spDISManager;
HRESULT hr;
hr = PdkServices::GetPdk()->QueryService(SID_DISManager, IID_IDISManagerV450, (void**)& spDISManager);
- Mon Oct 21, 2019 2:51 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: I cant get the IDISManagerV450.
- Replies: 6
- Views: 22279
Re: I cant get the IDISManagerV450.
Is there a quick example of setting up the OnReceive() and OnSend() callbacks in the IPduCallbackV440 class?
- Thu Aug 15, 2019 3:52 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: Draw Distance in Virtual Cockpit
- Replies: 0
- Views: 8444
Draw Distance in Virtual Cockpit
Is there a minimum distance away from the user that is needed for DrawLine(), DrawSphere(), etc... to be seen? I am trying to draw inside the cockpit to grab the pilots attention during various events and I can't see any of my draws inside the cockpit.
Thanks!
Thanks!
- Wed Apr 17, 2019 5:51 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: On screen text display in VR
- Replies: 14
- Views: 33326
Re: On screen text display in VR
Okay I figured it out. Didn't copy all my code so the error wasn't easily available. I was using the wrong SIMCONNECT_CLIENT_DATA_DEFINITION_ID in my SimConnect_RequestClientData call. The corrected code if anyone cares: DWORD ClientIDStruct = 9999; enum DATA_DEFINE_ID { LASER_FIRING_DATA_ID2, }; en...
- Tue Apr 16, 2019 6:46 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: On screen text display in VR
- Replies: 14
- Views: 33326
Re: On screen text display in VR
I've figured out the sizing and it seems to be working (returning a size of 24 for my 3 doubles, thank you JB3DG and Clifton). My issue is pulling the information out in the MyDispatchProc . I'm not getting newStruct->Lon or newStruct->Alt to return the numbers I set for them before the SimConnect_S...
- Tue Apr 16, 2019 2:23 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: On screen text display in VR
- Replies: 14
- Views: 33326
Re: On screen text display in VR
How does the SetClientData change when the data is a struct (composed of doubles) instead of a double? I'm not getting my callback to fire when I change a piece of my struct and then SetClientData. I looked at the TaggedData.cpp but I don't think a struct will act in the same way as the enums do aft...
- Mon Apr 15, 2019 9:39 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: On screen text display in VR
- Replies: 14
- Views: 33326
Re: On screen text display in VR
Thank you! That worked!
I did have to change it just a little to:
I did have to change it just a little to:
case REQUEST_DATA:
printf("\nData request returned: %f\n", *(double*)&pObjData->dwData);
break;
- Mon Apr 15, 2019 7:28 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: On screen text display in VR
- Replies: 14
- Views: 33326
Re: On screen text display in VR
Clifton, Thank you for the tip! I will be moving to more complicated data types but I wanted to start with something simpler. I guess I got lucky on that! Here's the callback code that waits for changes in the block data: case SIMCONNECT_RECV_ID_CLIENT_DATA: { SIMCONNECT_RECV_CLIENT_DATA *pObjData =...
- Mon Apr 15, 2019 4:47 pm
- Forum: Software Development Kit (SDK) Questions
- Topic: On screen text display in VR
- Replies: 14
- Views: 33326
Re: On screen text display in VR
Okay so I'm almost there! I have the SimConnect instance up and running. Now I'm trying to create a block of data on the server that my clients can write to (sorry for the wall of text): enum SIMCONNECT_CLIENT_DATA_DEFINITION_ID { LASER_FIRING_DATA_ID, }; enum DATA_REQUEST_ID { REQUEST_DATA, }; void...