- Messages
- 468
- Country

I spent all weekend trying to get a nav flag working on my 3D modelled HSI gauge and failed miserably. I tried to do it as an animated part (rotary animation dropping down out of the gauge body) and then as a visibility item so that it instantly displayed when the conditions were met (i.e. no tuned nav station in range) but neither method worked.
Robert (N2056) even gave me some animation code that works for him but it does not work for me, in fact when I try to use his code Gmax chokes during the export process and fails to export giving a long error message. His code is below:
When I tag my animated part with that code and try to export I get the following error message:
If I un-tag the part it exports perfectly (with no animation of course). The above is fully repeatable in that with the code the export chokes, without it the export works as expected.
Googling the error message gives hundreds of hits all relating to different issues so nothing is clear as to what the problem might be.
Does anyone have a clue what is happening here or maybe have either working animation code or working visibility tags that I can try? I have searched through the SDK and all my installed 2D gauges for clues as to what to use to solve the issue but not had much luck.
Robert (N2056) even gave me some animation code that works for him but it does not work for me, in fact when I try to use his code Gmax chokes during the export process and fails to export giving a long error message. His code is below:
Code:
<Animation name="NAV_Flag" guid="61846b31-3f34-71b2-627c-d04451d7c31a" type="Sim" typeParam2="NAV_Flag" length="50" typeParam="AutoPlay" />
<PartInfo>
<Name>NAV_Flag</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>(A:NAV HAS NAV:1,bool) 50 *</Code>
<Lag>300</Lag>
</Parameter>
</Animation>
</PartInfo>
When I tag my animated part with that code and try to export I get the following error message:
ERROR:
Failed processing animation file!!
ERROR:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.WriteSimAnimation(XPartInfo_Animation PInfo)
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.WriteANIM(XmlNode node)
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.WriteANIMLib(XmlNode node)
at Microsoft.FlightSimulator.XAnimToAnimLib.ANIMProcessor.GenerateOutput(FileExporter Exporter)
at Microsoft.FlightSimulator.XAnimToAnimLib.XAnimToAnimLib.Process(Stream OutputStream)
If I un-tag the part it exports perfectly (with no animation of course). The above is fully repeatable in that with the code the export chokes, without it the export works as expected.
Googling the error message gives hundreds of hits all relating to different issues so nothing is clear as to what the problem might be.
Does anyone have a clue what is happening here or maybe have either working animation code or working visibility tags that I can try? I have searched through the SDK and all my installed 2D gauges for clues as to what to use to solve the issue but not had much luck.
Last edited:

