• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA a simple xml gauge that works in FS9 but not in FSX

adr179

Resource contributor
Messages
259
Country
slovenia
Hi everyone. I'm trying to make a relative simple variometer gauge that works in FS9, to work in FSX where it doesn't - for no obvious reason.Vertical speed indication itself works, but there's a portion of gauge code that shoud turn the McCready ring and that part works in FS9 but not in FSX. Code looks like this:

Code:
   <Element>
      <Position X="157" Y="157"/>
      <Image Name="MCVario_LS7_ring.bmp" PointsTo="North" ImageSizes="315,315,0,0">
         <Axis X="157" Y="157"/>
      </Image>
      <Rotate>
         <Value Minimum="0" Maximum="3">(A:Autopilot mach hold var, mach) 2- </Value>
         <Nonlinearity>
            <Item Value="0" X="2" Y="157"/>
            <Item Value="0.5" X="315" Y="157"/>
            <Item Value="1" X="2" Y="157"/>
         </Nonlinearity>
         <Delay DegreesPerSecond="30"/>
      </Rotate>
   </Element>

and the relevant mouse code:

Code:
   <Mouse>
      <Area Left="5" Width="45" Top="75" Height="150">
         <Click Event="AP_MACH_VAR_DEC" Repeat="Yes"/>
         <Cursor Type="DownArrow"/>
      </Area>
      <Area Left="250" Width="45" Top="75" Height="150">
         <Click Event="AP_MACH_VAR_INC" Repeat="Yes"/>
         <Cursor Type="UpArrow"/>
      </Area>
   </Mouse>

I checked both SDK's for eventual change of the variable used, but it's the same in both versions of SDK, so I can't figure out, why gauge works in FS9, but not in FSX.
 

Dietmar

Resource contributor
Messages
198
Country
germany
Hi,
try this : (A:AUTOPILOT MACH HOLD VAR Selected) with no unit defined.
The FSX SDK says:
AUTOPILOT MACH HOLD VAR Selected mach Number

Dietmar
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Hi,
try this : (A:AUTOPILOT MACH HOLD VAR Selected) with no unit defined.
The FSX SDK says:
AUTOPILOT MACH HOLD VAR Selected mach Number

Dietmar

Er, not quite! "Number" means just that: number!

The correct syntax is:

(A:Autopilot mach hold var, number)
 

adr179

Resource contributor
Messages
259
Country
slovenia
Thank You both for Your replies gentlemen, but actually my question remains unanswered still. Point is both SDK's list variable

A:Autopilot mach hold var, mach

as a valid choice and that actually works in FS9 but not in FSX, so puzzle remains unsolved.
 
Messages
130
Country
france
<Value Minimum="0" Maximum="3">(A:Autopilot mach hold var, mach) 2- </Value>

Not sure whether that's the cause for the gauge not working, but there may be a space required between "2" and "-" in this line.
 

adr179

Resource contributor
Messages
259
Country
slovenia
I tried also Your suggestion, Teson1, but still gauge didn't work.
Actually, whatever I tried with A:Autopilot mach hold var, didn't work
in FSX, but worked in FS9.

But then I tried this:

A:AUTOPILOT VERTICAL HOLD VAR

and

AP_VS_VAR_DEC and AP_VS_VAR_INC, for the mouse area

since variable to get vertical speed indication is:

A:Vertical speed

and that worked. So it seems like FSX is somehow checking relations within the gauge, while FS9 does not - before we had vertical speed for indication and mach for rotation of McCready ring and now both are related to vertical speed.
 
Top