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

Data Strings in FS9 Schema

Messages
278
Country
ca-britishcolumbia
Hi All,
As some of you are aware I was working on a Nav Radar a few months back in FSX Schema, which well did'nt pan out to what i actually wanted, so after much frustration and loads of help from the great people that makes this site second to none, I shelved it until my migranes went away. A few weeks ago I dusted it off and converted to the, MUCH EASIER, FS9 Schema and 90% of my issues went away...

One issue i can't seem to overcome is writing text data strings. I know these strings worked in the FSX version, but can't get them to display in the FS9 version? Anything I missed or should be aware of key differences when writing them? (See Attached)

As always any input greatly appreaciated.

Thanks Greg

Code:
<Element Name="RangeDisplay">
  <Position X="515.5" Y="600.0"/>
  <Visible>(L:TrafficRadarPage,bool)</Visible>
  <Text X="75" Y="25" Length="75" Font="Arial Black" FontSize="20" Adjust="Left" VerticalAdjust="Center" Color="0xF0D0D0" Multiline="No" Bright="Yes">
[COLOR="Red"]<String>
RNG %((L:map_ZoomFactor,number) s0 5 &gt;=)
%{if}%(l0)%!d!\{dpl=nm}%{else}%(l0 1 &gt;=)%{if}%(l0)
%!.1f!\{dpl=nm}%{else}%(l0 6076 *)%!d!\{dpl=ft}%{end}%{end}
</String>[/COLOR]
  </Text>
</Element>

Code:
<Element Name="Save Position">
  <Visible>(L:MFDOffOn,bool) (L:DisplayPosition,bool)</Visible>
    <Position X="225.000" Y="586.000"/>
    <Text X="32" Y="300" Font="Arial Black" FontSize="14" Color="Red" BackgroundColor="0x000000" Bold="Yes" Bright="Yes" Multiline="No">
[COLOR="red"]<String>
Saved Position \n LAT %((L:PlaneLatDisplayed, degrees))%!.4f! \n 
LON %((L:PlaneLonDisplayed, degrees))%!.4f!
</String>[/COLOR]
    </Text>
  </Element>
 

Attachments

  • String error.jpg
    String error.jpg
    14.8 KB · Views: 448
Thanks

Thanks for the idea, but no luck :confused: I have been trying to decifer it step by step removing and adding the "%" as seems reasonable, all to no avail so far. Will keep plugging away at it, it has to work eventually :o

Greg
 
Ahhhhhhhhhhhh!

Code:
<FormattedText X="5" Y="8" Font="Arial Black" FontSize="10" Bold="Yes" Bright="Yes" Color="White" Adjust="Left" VerticalAdjust="Center"  Multiline="Yes">
<String>THE CODE WORKS</String>
</FormattedText>

Figured it out! Use Formatted text and the results will make me happy:D

Thanks
Greg
 
Good to know.

The difference between model-specific XML code and code for 2D panels is driving me nuts as well. All these different tags...
 
I hadn't even noticed that you weren't using <FormattedText>, as I quit using regular <Text> years ago...

...I was busy parsing the script in my mind and thinking, there's nothing wrong with this syntax! :eek:

The escape codes will only work with <FormattedText> as you've now (re)discovered.
 
Interesting that they work in the normal <String> command in FSX, though.
 
Thanks

I fumbled across it when i was frustrated and desperate and just for giggles gave it a whirl. Of course I was shocked when it worked. I am finding huge differences between FSX and FS9. Most of all FS9 is a lot easier to work with.

Thanks
Greg
 
I quite deliberately have chosen to totally IGNORE <Text> in favor of <FormattedText> for the simple reason that the same XML "gauge" will work in both FS9 and FSX without any modifications...

It really is that simple! :cool:
 
Yes, and Formatted Text will avoid an FSX bug in Text commands - when you swap two pieces of text using a Visibility command the text disappears rather than swapping.
 
Well I know what i am doing for the next little while, as some of my code is still in <Text> format. Thanks for the little tip.

Cheers
Greg
 
Back
Top