- Messages
- 542
- Country

I have a small instrument that successfully generates all the text readouts that I require.
In this Element section,
Each line results in either of the following;
16 , 26 , 38 , 47 , 58 , 72.5 degrees.
As can be seen this is placed at Tabs=37L .
The 16 degrees reads at the correct position , but as it is cycled by the successive A:Var values the following readouts each progressively move to the right.
My guess is that each line is processing an 'if' or 'else' , and that the 'else is a blank space ,
thus the next line 'if' readout is moved over to the right of that blank space.
How do I correct that issue ?
Cheers
Karol
PS;
Full instrument code is,
EDIT: Corrected above code by removing the spaces.
In this Element section,
Code:
<!-- WING SWEEP Degrees -->
<Element>
<Position X="6" Y="6"/>
<FormattedText X="75" Y="11" Font="Tahoma" FontSize="10" Tabs="1L,37L" LineSpacing="10" Adjust="Left" Color="#A1A9A6" Bright="Yes">
<String>
%SWEEP%
\t%(75 100 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 16%\{dplo= }%{end}%
%(40 48 (A:Leading Edge Flaps0 Left Percent,percent) rng) %{if}% 26%\{dplo= }%{end}%
%(30 36 (A:Leading Edge Flaps0 Left Percent,percent) rng) %{if}% 38%\{dplo= }%{end}%
%(20 26 (A:Leading Edge Flaps0 Left Percent,percent) rng) %{if}% 47%\{dplo= }%{end}%
%(10 16 (A:Leading Edge Flaps0 Left Percent,percent) rng) %{if}% 58%\{dplo= }%{end}%
%(0 5 (A:Leading Edge Flaps0 Left Percent,percent) rng) %{if}% 72.5%\{dplo= }%{end}%
</String>
</FormattedText>
</Element>
16 , 26 , 38 , 47 , 58 , 72.5 degrees.
As can be seen this is placed at Tabs=37L .
The 16 degrees reads at the correct position , but as it is cycled by the successive A:Var values the following readouts each progressively move to the right.
My guess is that each line is processing an 'if' or 'else' , and that the 'else is a blank space ,
thus the next line 'if' readout is moved over to the right of that blank space.
How do I correct that issue ?
Cheers
Karol
PS;
Full instrument code is,
Code:
<Gauge Name="WING SWEEP FLAP READOUT" Version="1.0">
<Size X="82" Y="60" />
<!--Inst BACKGROUND No Bitmaps Alphasim Virtavia F-111 @Apr2015 -->
<Element Name="WING RECTANGLE">
<Position X="0" Y="0"/>
<Rectangle Width="82" Height="60" FillColor="#272727" Bright="Yes"/>
</Element>
<!-- WING SWEEP Degrees -->
<Element>
<Position X="6" Y="6"/>
<FormattedText X="75" Y="11" Font="Tahoma" FontSize="10" Tabs="1L,37L" LineSpacing="10" Adjust="Left" Color="#A1A9A6" Bright="Yes">
<String>
%SWEEP%
\t%(75 100 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 16%\{dplo= }%{end}%
%(40 48 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 26%\{dplo= }%{end}%
%(30 36 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 38%\{dplo= }%{end}%
%(20 26 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 47%\{dplo= }%{end}%
%(10 16 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 58%\{dplo= }%{end}%
%(0 5 (A:Leading Edge Flaps0 Left Percent,percent) rng)%{if}% 72.5%\{dplo= }%{end}%
</String>
</FormattedText>
</Element>
<!-- FLAPS EXTENTION Degrees -->
<Element>
<Position X="6" Y="22"/>
<FormattedText X="70" Y="11" Font="Tahoma" FontSize="10" Tabs="1L,37L" LineSpacing="10" Adjust="Left" Color="#A1A9A6" Bright="Yes">
<String>
%FLAPS%
\t%(0 77 (A:Trailing Edge Flaps0 Left Percent,percent) rng)%{if}% UP%{end}%
%(80 90 (A:Trailing Edge Flaps0 Left Percent,percent) rng)%{if}% 25%\{dplo= }%{end}%
%(95 100 (A:Trailing Edge Flaps0 Left Percent,percent) rng)%{if}% 34%\{dplo= }%{end}%
</String>
</FormattedText>
</Element>
<!-- SLATS EXTENTION -->
<Element>
<Position X="6" Y="38"/>
<FormattedText X="70" Y="11" Font="Tahoma" FontSize="10" Tabs="1L,37L" LineSpacing="10" Adjust="Left" Color="#A1A9A6" Bright="Yes">
<String>
%SLATS%
\t%((A:Trailing Edge Flaps0 Left Percent,percent) 0 == if{ ' UP' } els{ ' DWN' } )%!s!%{end}%
</String>
</FormattedText>
</Element>
</Gauge>
EDIT: Corrected above code by removing the spaces.
Last edited:
