- Messages
- 26
- Country

Hi All
I wonder if anyone can point me in the right direction? I'm pretty new to Python and SimConnect so please bear with me if I have glaring errors.
I'm trying to set the ENG_OIL_QUANTITY:1 on the Bonanza in MSFS but this doesn't seem to be working. I'm using the Python SimConnect library from GitHub (https://github.com/odwdinc/Python-SimConnect). I've been able to retrieve and set other variables so I'm not sure if I just can't set the oil level.
This is my code so far. Many thanks for any pointers!
When I print the result of setOil this returns true.
Many thanks for any help!
Matt
I wonder if anyone can point me in the right direction? I'm pretty new to Python and SimConnect so please bear with me if I have glaring errors.
I'm trying to set the ENG_OIL_QUANTITY:1 on the Bonanza in MSFS but this doesn't seem to be working. I'm using the Python SimConnect library from GitHub (https://github.com/odwdinc/Python-SimConnect). I've been able to retrieve and set other variables so I'm not sure if I just can't set the oil level.
This is my code so far. Many thanks for any pointers!
Python:
#Import Modules
from SimConnect import *
# Create SimConnect link
SimConnect = SimConnect()
# Create Aircraft requests
AircraftRequests = AircraftRequests(SimConnect)
# Engine Management
TotalOil = AircraftRequests.get("ENG_OIL_QUANTITY:1")
print(TotalOil)
newAmount = 0.9
setOil = AircraftRequests.set("ENG_OIL_QUANTITY:1", newAmount)
TotalOil = AircraftRequests.get("ENG_OIL_QUANTITY:1")
print(setOil)
When I print the result of setOil this returns true.
Many thanks for any help!
Matt
Last edited:
