si_variable_create
Simulation Instrument Studio 1
Definition
var_id = si_variable_create(variable, unit, initial_value)
Remarks
Create a new Studio inter-instrument variable.
Example
No sample instrument calls this yet.
si_variable_create()

Home›All functions›Inter-instrument
Simulation Instrument Studio 1
Simulation Instrument Studio 1
var_id = si_variable_create(variable, unit, initial_value)
Create a new Studio inter-instrument variable.
No sample instrument calls this yet.
si_variable_create()

Simulation Instrument Studio 1
si_variable_subscribe(variable, unit, callback_function)
Subscribe to specified Studio variable(s).
| Name | Description |
|---|---|
variable | Name of the variable to read or write. |
unit | Unit of the value, such as Feet or Degrees. |
callback_function | Function called when the value changes. |
No sample instrument calls this yet.
si_variable_subscribe(variable, unit, function() end)

Simulation Instrument Studio 1
si_variable_write(var_id, value)
Write to an Studio variable.
| Name | Description |
|---|---|
var_id | Id returned by the call that created the object. |
value | The value to write. |
No sample instrument calls this yet.
si_variable_write(var_id, value)

Simulation Instrument Studio 1
si_command_subscribe(command, callback_function)
Subscribe to specified Studio command(s).
| Name | Description |
|---|---|
command | Simulator command name. |
callback_function | Function called when the value changes. |
No sample instrument calls this yet.
si_command_subscribe("...", function() end)

Simulation Instrument Studio 1
si_command(command)
Send an Studio command.
| Name | Description |
|---|---|
command | Simulator command name. |
No sample instrument calls this yet.
si_command("...")

Simulation Instrument Studio 1
variable_subscribe(source, variable_name, type, callback_function)
Subscribe to multiple sources (X-Plane, FSX, SI, etc.) using one subscription.
| Name | Description |
|---|---|
source | Where the value comes from. A layer name, or a map source tag. |
variable_name | Property or object name. |
type | Value type: FLOAT, INT, DOUBLE, or an array type such as FLOAT[8]. |
callback_function | Function called when the value changes. |
No sample instrument calls this yet.
variable_subscribe(source, variable_name, "FLOAT", function() end)

Simulation Instrument Studio 1
request_callback(callback_function)
Force an update on a subscription.
| Name | Description |
|---|---|
callback_function | Function called when the value changes. |
No sample instrument calls this yet.
request_callback(function() end)
