Simulation Instruments

Home›All functions›User Properties

User properties

Simulation Instrument Studio 1

user_prop_add_integer

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_integer(name, min, max, default_value, description)

Remarks

Create a new integer user property (shown in instrument properties).

Example

From sample instrument instruments/generic_airspeed/logic.lua

    return tonumber(user_prop_get(user_prop_add_integer(name, min, max, default, desc))) or default
end

local scale_min = knob("Scale min kt", 0, 100, 0, "Left end of the dial, knots")
local scale_max = knob("Scale max kt", 60, 500, 200, "Right end of the dial, knots")
local white_a = knob("White arc start kt", 0, 400, 40, "Flap-range arc, low end")
Photo slot: shots/user_prop_add_integer.png

user_prop_add_real

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_real(name, min, max, default_value, description)

Remarks

Create a new floating point user property.

Example

No sample instrument calls this yet.

user_prop_add_real()
Photo slot: shots/user_prop_add_real.png

user_prop_add_boolean

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_boolean(name, default_value, description)

Remarks

Create a new boolean user property.

Example

No sample instrument calls this yet.

user_prop_add_boolean()
Photo slot: shots/user_prop_add_boolean.png

user_prop_add_string

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_string(name, default_value, description)

Remarks

Create a new string user property.

Example

No sample instrument calls this yet.

user_prop_add_string()
Photo slot: shots/user_prop_add_string.png

user_prop_add_enum

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_enum(name, possible_values, default_value, description)

Remarks

Create a new enumeration (list) user property.

Example

No sample instrument calls this yet.

user_prop_add_enum()
Photo slot: shots/user_prop_add_enum.png

user_prop_add_percentage

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_percentage(name, min, max, default_value, description)

Remarks

Create a new percentage user property.

Example

No sample instrument calls this yet.

user_prop_add_percentage()
Photo slot: shots/user_prop_add_percentage.png

user_prop_add_table

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_table(name, column_name, column_type, ..., description)

Remarks

Create a new table user property.

Example

No sample instrument calls this yet.

user_prop_add_table()
Photo slot: shots/user_prop_add_table.png

user_prop_add_hardware_id

Simulation Instrument Studio 1

Definition

user_prop_id = user_prop_add_hardware_id(name, default_value, description)

Remarks

Create a new hardware ID user property.

Example

No sample instrument calls this yet.

user_prop_add_hardware_id()
Photo slot: shots/user_prop_add_hardware_id.png

user_prop_get

Simulation Instrument Studio 1

Definition

value = user_prop_get(user_prop_id)

Remarks

Get the value of a user property.

Example

From sample instrument instruments/generic_airspeed/logic.lua

    return tonumber(user_prop_get(user_prop_add_integer(name, min, max, default, desc))) or default
end

local scale_min = knob("Scale min kt", 0, 100, 0, "Left end of the dial, knots")
local scale_max = knob("Scale max kt", 60, 500, 200, "Right end of the dial, knots")
local white_a = knob("White arc start kt", 0, 400, 40, "Flap-range arc, low end")
Photo slot: shots/user_prop_get.png