simulator.createDataref() Method

The simulator.createDataref() method creates a new dataref, returning an object that can then be used to manipulate the dataref.

Syntax

simulator.createDataref(name)

Parameters

Return value

An OwnedDataref object is returned.

Example

> latitude_dr = simulator.createDataref("lee/custom/total_thrust", "number", false, () => {25000.0})
OwnedDataref{ name: "lee/custom/total_thrust", type: "number", writable: false }
> latitude_dr.value
25000.0

References