krispy1001
Resource contributor
- Messages
- 707
- Country

Hi Everyone!
I am new to xml programming, I am a Java programmer.
I went through the two tutorials in the "Panels and Gauges SDK" and made the fuel pressure, and stop watch gauges. I have also looked at a lot of default gauges in FSX.
I would like to make an xml button that when pushed, would lock your aircraft's altitude at that altitude and maintain it stationary. I have read through the sdk and I found that there is an update command that you can use to keep checking to see if the variable's value has changed and then you can make changes with code to keep the value at what you want it to be. I have also checked that the sim variable that I want to change can be wrote to. The variable is "PLANE ALTITUDE"
Just to do a simple testing to see if I could write a value to PLANE ALTITUDE I tried the below code.
<Gauge Name="Altitude Hold Switch" Version="1.0">
<Element>
<Select>
<Value>(A:Autopilot master,bool)</Value>
<Failures>
<SYSTEM_ELECTRICAL_PANELS Action="0" />
</Failures>
<Case Value="0">
<Image Name="AP_Up.bmp" />
</Case>
<Case Value="1">
<Image Name="AP_Down.bmp" />
<Value>(A: PLANE ALTITUDE,Feet) 6000 =</Value>
</Case>
</Select>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_AUTOPILOT_MASTER" />
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_MASTER" />
<Area Left="2" Top="3" Right="14" Bottom="14">
<Cursor Type="Hand" />
<Click Kind="LeftSingle">(>K:AP_MASTER)</Click>
</Area>
</Mouse>
+++I had to add a space in the PLANE ALTITUDE code so that a smiley face would not show up.
The code did nothing!
Any suggestions on any tutorials on how to write to a sim variable?
Thanks, Kris
I am new to xml programming, I am a Java programmer.
I went through the two tutorials in the "Panels and Gauges SDK" and made the fuel pressure, and stop watch gauges. I have also looked at a lot of default gauges in FSX.
I would like to make an xml button that when pushed, would lock your aircraft's altitude at that altitude and maintain it stationary. I have read through the sdk and I found that there is an update command that you can use to keep checking to see if the variable's value has changed and then you can make changes with code to keep the value at what you want it to be. I have also checked that the sim variable that I want to change can be wrote to. The variable is "PLANE ALTITUDE"
Just to do a simple testing to see if I could write a value to PLANE ALTITUDE I tried the below code.
<Gauge Name="Altitude Hold Switch" Version="1.0">
<Element>
<Select>
<Value>(A:Autopilot master,bool)</Value>
<Failures>
<SYSTEM_ELECTRICAL_PANELS Action="0" />
</Failures>
<Case Value="0">
<Image Name="AP_Up.bmp" />
</Case>
<Case Value="1">
<Image Name="AP_Down.bmp" />
<Value>(A: PLANE ALTITUDE,Feet) 6000 =</Value>
</Case>
</Select>
</Element>
<Mouse>
<Help ID="HELPID_GAUGE_AUTOPILOT_MASTER" />
<Tooltip ID="TOOLTIPTEXT_AUTOPILOT_MASTER" />
<Area Left="2" Top="3" Right="14" Bottom="14">
<Cursor Type="Hand" />
<Click Kind="LeftSingle">(>K:AP_MASTER)</Click>
</Area>
</Mouse>
+++I had to add a space in the PLANE ALTITUDE code so that a smiley face would not show up.
The code did nothing!
Any suggestions on any tutorials on how to write to a sim variable?
Thanks, Kris
Last edited:



