• 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 2d elements xml into 3d part xml

Messages
520
Country
australia
Hi
Wondering if its possible to convert a multiple elements 2d xml code into 3d part xml code, so it can be applied to a single polly inside the model.
if so how is the syntax structured and dose it need to be in both models?
For example how would you insert this code into the 3dmodel :)...and dont say via the panel.cfg :D
Code:
<Gauge Name="tic toc" Version="1.0">
 <Update Frequency="6"/>
  <Element>
    <Select>
	<Value>(L:start,number) 1 ==
		  if{ (L:Var6,number) 0 == if{ 1 (&gt;L:Var6,number) (E:Local Time, seconds) 80 + (&gt;L:Var7,number) } }
		 els{ (L:Var6,number) 0 &gt; if{ 0 (&gt;L:Var6,number) } }
	</Value>
    </Select>
 </Element>
  <Element>
    <Select>
	<Value>(L:Var7,number) (E:Local Time, seconds) - 0 max (&gt;L:timer,number)
	</Value>
    </Select>
 </Element>
  <Element>
    <Select>
	<Value>(L:Var6,number) 1 == 
		  if{ (P:Local Time, seconds) (L:Var7,number) &gt; if{ 0 (&gt;L:start,number) } }
	</Value>
    </Select>
 </Element>
</Gauge>
Thanks and cheers
Wozza
 
Actually, there's really no need to have three sequential <Value> statements at all, since all three are executed from top to bottom within the <Update> section anyway.

So, you can put all your "begs in one askit" so to speak... ;)

For that matter, there's really no need for all of the <Element> sections either.

Your "control poly" need only be in the exterior model.

Place all of your scripts into a single <Code> section in your modeldef.xml script, possibly using a <Visibility> tag:
Code:
  <PartInfo>
    <Name>TicToc</Name>
    <Visibility>
      <Parameter>
        <Code>
               <!-- PLACE YOUR SCRIPT HERE -->
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
 
Last edited:
Hi Bill
Thanks!!
your kidding me that easy :) ....Ive gotten so use to using elements for braking each section of the gauge up ....I do find this easier to debug but sure would make some of the gauges I got smaller :)

You say possibly using Visibility is there any reason not to use it?
any draw backs from using large code slices inside the model ...things like delay in draw calls/part rendering ,compiler chokes FPS suffer more than if its 2d
Thanks again
Wozza
 
I say "possibly" only because the <Visibility> tag normally is used to hide/unhide a polygon...

...but, in this case that doesn't really matter, because the script will continue to run whether the polygon is visible or not! :rotfl:

If you think about it for a moment, it makes perfect sense, otherwise how would the sim ever know to "unhide" the polygon once it was hidden! :cool:

The script will execute at a minimum of 18 Hz, irrespective of the framerate.

For traditional XML "gauge" scripts, it's only necessary to put your control script between the <Update>...</Update> tags:

Code:
<Update Frequency="6">

     <!-- control scripts here -->

</Update>
 
Last edited:
Hi Bill
Thanks again
Makes sense re the vis code,but thought Id ask just in case there was some sort of catch22 like it stopped updating or G:vars didnt work :)
Cheers
Wozza
 
Hi Bill
Thanks again
Makes sense re the vis code,but thought Id ask just in case there was some sort of catch22 like it stopped updating or G:vars didnt work :)
Cheers
Wozza

Frankly I think G:vars are overrated, mainly because they're limited to a single gauge instance...

...which is why of course that we can't have synchronized GPS instances between a 2d panel, sub-panel or VC.

In the same way, a G:var that's used in a compiled model won't be "seen" by any other gauge in the project.

But, if you use a G:var in the same way they are normally used, there should be no problems at all.
 
Back
Top