Instrument prop

From Sim Innovations Wiki
Jump to navigation Jump to search

Description

value = instrument_prop(property)

instrument_prop is used to get the settings from the current instrument like aircraft, type, version, height, width, development, etc etc...

Return value

Argument Type Description
value Object Return the value of the given property. Returns 'nil' when an unknown property is given.

Arguments

# Argument Type Description
1 property String The type of property to fetch. See table below for the options

Properties

# Property Type Description
1 AIRCRAFT String Instrument Aircraft
2 AUTHOR String Instrument Author
3 TYPE String Instrument type
4 UUID String Instrument UUID (unique value)
5 PREF_WIDTH Number Instrument Preferred width
6 PREF_HEIGHT Number Instrument Preferred height
7 WIDTH Number Instrument width (user definable)
8 HEIGHT Number Instrument height (user definable)
9 DESCRIPTION String Instrument description
10 COMPATIBLE_FSX Boolean Is this instrument compatible with FSX
11 COMPATIBLE_P3D Boolean Is this instrument compatible with P3D
12 COMPATIBLE_XPL Boolean Is this instrument compatible with X-plane
13 VERSION Number Instrument version
14 DEVELOPMENT Boolean Has this instrument been started in development mode (from edit/create tab)
15 IS_HOME_USE Boolean True when instrument or panel is run on a Home use Air Manager or Air Player.
16 IS_PROFESSIONAL Boolean True when instrument or panel is run on a Professional Air Manager or Air Player.
17 PLATFORM String Returns the platform the instrument or panel is running on. Can be UNKNOWN, WINDOWS, MAC, LINUX, RASPBERRY_PI, ANDROID or IPAD.

Example

-- Print the instrument author
print( instrument_prop("AUTHOR") )

-- See if we started from the create/edit tab
if instrument_prop("DEVELOPMENT") then
  print("We are running in development mode!")
end