• 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.

FS2004 Displaying different Selcal codes.

Messages
1,468
Country
italy
As part of my wide screen panel bmp I now have a complete Selcal placard for the registration of that particular a/c. The registration is also displayed thus:-
Code:
<Gauge Name="Registration" Version="1.0">
<Element>
   <Text X="150" Y="25" Length="7" Font="Arial Black" Color="#B1BEB6" Adjust="Center" VerticalAdjust="Center" Multiline="No">
   <String>%((A:atc id, string))%!s!%</String>
   </Text>
</Element>
<Mouse>
   <Tooltip>Aircraft registration</Tooltip>
</Mouse>
</Gauge>

Is there a way of interrogating (A:atc id, string) in xml so that I can change the selcal code according to which model/airline one flies?
 
I'm uncertain of just what you want. The aircraft.cfg entry for each 'livery' specifies the atc_id=, thus it is not dynamically "updatable" via an XML gauge.
 
I'm uncertain of just what you want. The aircraft.cfg entry for each 'livery' specifies the atc_id=, thus it is not dynamically "updatable" via an XML gauge.
Hi Bill,
I know the registration cannot be changed. What I want is to "read" the registration so that I can change the selcal letter codes placarded on the cockpit panel.
 
If all you need is to split up the reg then try something like:

Code:
<Element>
<Position X="9" Y="4"/>
<Text X="40" Y="14" Length="2" Font="Arial Italic" Color="#CC6633" Adjust="Left" FontWeight="300" VerticalAdjust="Center" Multiline="No">
<String>%((A:atc id, string) 0 2 ssub)%!s!%</String>
</Text>
</Element>

<Element>
<Position X="23" Y="5"/>
<Text X="5" Y="15" Length="2" Font="Lucida Sans Typewriter" Color="#CC6633" Adjust="Left" FontWeight="300" VerticalAdjust="Center" Multiline="No">
<String>-</String>
</Text>
</Element>

<Element>
<Position X="29" Y="6"/>
<Text X="40" Y="15" Length="3" Font="Lucida Sans Typewriter" Color="#CC0033" Adjust="Left" FontWeight="400" VerticalAdjust="Center" Multiline="No">
<String>%((A:atc id, string) 2 2 ssub)%!s!%</String>
</Text>
</Element>

<Element>
<Position X="49" Y="6"/>
<Text X="40" Y="13" Length="3" Font="Arial Italic" Color="#CC0033" Adjust="Left" FontWeight="500" VerticalAdjust="Center" Multiline="No">
<String>%((A:atc id, string) 4 1 ssub)%!s!%</String>
</Text>
</Element>
gave me


reg.png


But it cannot be that easy!:)

Walter
 
Have not tried it , but it might be possible by expanding the " atc_id= " in the aircraft cfg entry .

ie;
atc_id= B737-800 QANTAS CMC
Aircraft model - Airline - Individual aircraft Registration

Then
Using formatted text to show only the segment of " B737-800 QANTAS CMC " that you want to display
from the A:atc id, string .
Use L or C or R (Left Center Right ) and text size to display what you require.

The limitation would be that the aircraft cfg would have to be configured for this to work , and
each of "Aircraft model - Airline - Individual aircraft Registration" would have to have a fixed
number of text letters,
eg;
8 space 8 space 8.

Cheers
Karol
 
I don't want to "display" the a/c registration. The code at the top of this thread already does that! What I want is a way of identifying the registration so that I can change the selcal code:-
-If registration = G-ASGG then selcal string = BF-ED. If registration = A40 AB then selcal string = FG-JM etc etc
 
Last edited:
Maybe something like

Code:
     <Element>
      <Visible>  (A:atc id, string) 'G-ASGG' scmp !    </Visible>
      <Position X="260" Y="67"/>
           <Text X="200" Y="11" Bright="Yes" Length="10" Font="Arial" Color="White" BackgroundColor="Black" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
            <String>BF-ED</String>
           </Text>
     </Element>

     <Element>
      <Visible>  (A:atc id, string) 'A40 AB' scmp !    </Visible>
      <Position X="260" Y="67"/>
           <Text X="200" Y="11" Bright="Yes" Length="10" Font="Arial" Color="White" BackgroundColor="Black" Adjust="Left" VerticalAdjust="Center" Multiline="No" Fixed="No">
            <String>FG-JM</String>
           </Text>
     </Element>

although it means inputting all of the possible registrations and their relevant Selcal codes...

Maybe...

Walter
 
I couldn't get your code to work. I tried this and it did return a 2. So I'm planning now to show different small bmps depending on the returned value. There are nine variants so it won't be too scary!
Code:
<Value>(A:atc id, string) 'G-ASGG' scmp ! if{ 2 (>L:selcal,number) } els{ 0 (>L:selcal,number) }</Value>
 
Back
Top