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

Proper Uses of 'Update'

Messages
10,149
Country
us-arizona
Hey all,

I am having some problems with using Update in my new gauge.

If I use <Update Frequency="3"/> and I put in another </Update> at the end of this (making it a Update Section), then the gauge is broke. If I use <Update Hidden="No"> (or yes) with another </Update> at the bottom of that section, the gauge will run, but the effect seems to not be working, things arent being updated.

How exactly does one use Updates?

I was looking around at other gauges like some Dwight had worked on, and found he used <Update Frequency="7"/> once at the top, then he might add a <Update Frequency="2"> (without the / slash) which has a ending </Update> on the end of that section, then some Elements (in that same gauge) will have a single line <Update Frequency="3"/> (that has the / slash symbol in it, used once) in that Element section, no ending cap with the </Update> on it.


So I take it you can use <Update Frequency="3"/> with no ending cap, used all by itself or in a Element
You can have an update section with <Update Frequency="3"> </Update>
And you can also have <Update Hidden="Yes"> (yes or no). (Note it doesnt have an / slash symbol).

Also... What does Update Hidden (yes or no) do in a gauge? How is it hidden?


If I remember correctly, Frequency = checks per second.

Sorry for all the questions. I never fully understood this and I am having some issues presently on it.



Bill
LHC
 
Bill,

As far as the open and closing tags is concerned, xml (html) has tags

<ATAG>
content
</ATAG>

So you can group things/object together. The content above belongs to the <ATAG> object (in simple terms)
Over time, people asked what if you don't have any content - that's too much typing .... that </ATAG> Geeezzzz!!

So they shortened it to <ATAG/> if you don't have any content.

So this
<ATAG></ATAG>
and this
<ATAG/>
are basically the same.

But this is an error (malformed)
<ATAG/></ATAG>

You basically have one open tag and two closing tags. So everything after the </ATAG> is considered bad and thrown away - hence your gauge did not work.

The <Update frequency="2"> (A:GPS IS ACTIVE WAYPOINT,bool) </Update> object can have a script (evaluation) (content) that gets update every Frequency=x time per second. See your DA40 PFD.xml - it checks the mode of the PFD.

So in this case you need the <ATAG>contentt</ATAG> form. If there was no script then <ATAG/> would be fine.

Now about the number of updates in one xml ...... (having more than one ... is that really correct?? - what I should say is what is the correct form of updates within updates)

This thread talks about the update and hidden stuff.
http://www.fsdeveloper.com/forum/threads/xml-updates-visibility-specific.108737/
 
Last edited:
Many thanks Ron. Now it all makes sense.

On having updates, we had to experiment because some Elements in the PFD/MFD screens werent updating, and at first, when we came out with these, they were heavy on frame rates, so Dwight did some experimentation to get them to perform better. This was back with FSX barely ran on the fastest computers, many years ago... (10?). We even had a 'shut off' mode where no gauges (maps and things) were written, like a sleep mode, as people couldnt run the GPS code and fly at the same time.

Dont have that problem these days. And having Udpate will cure things that 'go to sleep' and do not update.

As for speed, I dont know. I know that it 'can' get choppy with lower settings. I have even had a couple of complaints of a choppy PFD screen before, (perhaps 3+ years ago).


Thanks again for the tutorial on that. Massively appreciated.
 
So this statement in the SDK is misleading.

Update objects can be the parent of Update objects and Comment objects.

"parent of update objects" is not really true since we can only have one update.
 
Ron, that statement only applies to the new FSX XML Schema, which is why I parenthetically mentioned (using the FS9 XML Schema).

In that schema's convoluted and excessively verbose arrangement, one may indeed have multiple <Update> sections. In my own estimation, there aren't enough new things to make it worth the extra effort to use.
 
I agree on that. I would never start writing in FSX XML (I hope and pray). That is the goofiest stuff I have ever seen. I love the simplicity of FS9 XML.
 
Come on, people, it ain't that bad. Just an additional tag here and there.
 
Shirley, you jest! :)

The 'new' schema is a disaster when it comes to ease of implementation and understanding of existing coding!

Don't call me Shirley. [Puts a Nickel into the "overused movie quotes" piggy bank]

The only major drawback is that Notepad2 doesn't have a proper coloring scheme for the newer syntax.
 
If you can code a gauge with say 500 letters instead of 2500 letters, I say use the XML that would only use 500 letters. Thats just me though. :S Shirley...
 
Heretic, you are not alone. I know, I am backward, but I prefer FSX scheme. I thonk that it is because I begin to code with FSX scheme; and now I have many difficulties to read FS9 syntax. And I love Notepad++ syntaxic coloration.

And I prefer use (>L:Myvars) than &gt; "AND" than &amp;&amp;, "OR" than ||. Code is more clear....But I am a newbee ;)
 
I did not think, because I see always FS9 code with this old syntax....thanks for information
 
I use and, or, and >. I heard that you cant, but it still works. I think in P3D it didnt work for a while, but it works now.
 
Heretic, you are not alone. I know, I am backward, but I prefer FSX scheme. I thonk that it is because I begin to code with FSX scheme; and now I have many difficulties to read FS9 syntax. And I love Notepad++ syntaxic coloration.

And I prefer use (>L:Myvars) than &gt; "AND" than &amp;&amp;, "OR" than ||. Code is more clear....But I am a newbee ;)



I respect that. I heard how many people 'started' in FSX. All is well. I remember doing planes back in the FS8 era, FS2002. We were still using Asm files. Times have changed.
 
Over the years the more i write xml i never use Update as much. So i figure Update is really only good for coding that needs to constantly update values. But for updating a toggle or most xml logic i find that you just don't need to use Update.
So can someone explain in English why we would want to use Update!
 
Last edited:
To constantly update the condition evaluation of one or more variables. End of story.


More interesting is the question what difference, if any, there is between using "Update" and "Element-Select-Value" tags in FS9 syntax.
 
Back
Top