Fsx variable write

From Sim Innovations Wiki
Revision as of 09:53, 6 December 2018 by Admin (talk | contribs) (RPM wasn't writeable)
Jump to navigation Jump to search

Description

fsx_variable_write(variable, unit, value)

fsx_variable_write is used write a variable to FSX or Prepar3D

You can find the available variables for FSX here and the Prepar3D variables here (official).

Return value

This function won't return any value.

Arguments

# Argument Type Description
1 variable String Reference to a variable from Flight Simulator X or Prepar3D
2 unit String Unit of the variable, can be found with the variable. Different units can be used for different variables. For example Hours, Knots and RPM (look here for FSX units and here for Prepar3D) 3 value Number The value to be written

Examples

Write a standard FSX / Prepar3D variable

-- Write false to variable "GENERAL ENG GENERATOR ACTIVE:1"
fsx_variable_write("GENERAL ENG GENERATOR ACTIVE:1", "Bool", false)

Write a LVAR

-- Write 50 to the IAS/TAS conversion chart
fsx_variable_write("L:AirspeedTAS", "number", 50)