DragonflightDesign
Resource contributor
- Messages
- 1,368
- Country

Gotta 'nother problem (sigh). It's vb.Net again and I can say two things before proceeding: the C++ equivalent works perfectly and if I use RequestDataOnSimObjectByType triggered from an event timer then it also works perfectly. This, however, never triggers except when the P3D connection is doing its startup checks.
Why am I using vb.Net? because I'm far more comfortable creating GUIs in vb.Net or C# than I am in C++.
Code:
p3d_simconnect.RequestDataOnSimObject(P3Data.REQUEST_FUEL, P3Data.DEFINE_FUEL_TANKS, LockheedMartin.Prepar3D.SimConnect.SIMCONNECT_SIMOBJECT_TYPE.USER, SIMCONNECT_PERIOD.SECOND, 0, 0, 0, 0)
Code:
Friend Sub p3d_simconnect_OnRecvSimobjectData(ByVal sender As SimConnect, ByVal data As SIMCONNECT_RECV_SIMOBJECT_DATA)
Select Case data.dwDefineID {or Select Case data.dwRequestID}
Case P3Data.REQUEST_FUEL
Dim fuel As Fuel_Data = CType(data.dwData(0), Fuel_Data)
End Select


