Find and explore datarefs and commands in X-Plane:
Commands are an event, with a beginning and end; for example, a button being pushed, or a switch being flipped. To find a command, use the search window to search by name.
If you don't know the name, try opening the command history. When you use the command (by pressing a cockpit control, for example), you will see it in the command history.
Clicking View… to find more details about commands and datarefs.
DataRefTool may not find all commands due to limitations of the X-Plane SDK. (details)
Datarefs are a quantity or value in the simulator. Like commands, you can find them by name in the search window.
If you know that a dataref is changing in value, use the ch change filter button.
To keep an eye on the value of a dataref, add it to the Watch window by clicking the Watch checkbox. When your mouse is close to the window, you can drag it around.
DataRefTool uses different colors to indicate datarefs or commands in different states:
Default | Reduce colors | |
---|---|---|
White | White | Dataref: not changed recently |
Light cyan | Sky blue | Dataref: recent small changes |
Light magenta | Blue | Dataref: recent large changes |
Green | Yellow | Command: not used recently |
Yellow | Orange/vermillion | Command: used recently |
Red-orange | Vermillion | Dataref: deprecated |
Red-orange | Reddish purple | Dataref or command: ignored |
In an attempt to be accessible to colorblind users, an alternate color scheme is available.
The colors are based on the Wong color palette (Figure 2).
Bigger fonts are available in DRT through X-Plane's accessibility settings:
DataRefTool reads datarefs every frame in order to detect changes to values. Other plugins and X-Plane take significant time to compute these values; DRT takes time to identify changing values. This extra work may lower your frame rate if you're CPU-limited.
Here are the best ways to make sure that DRT is having the smallest impact on your FPS:
Close DataRefTool windows when you aren't using them. DRT does stop reading datarefs completely when all windows are closed; you should not lose any FPS at all when all windows are closed.
Update values at a lower rate will lower the load on your system. You can configure this in the DataRefTool menu:
Ignore datarefs that are slow to read. Create a file called X-Plane 12/Resources/Plugins/drt_ignore.txt
, and list the datarefs to ignore, one per line. Datarefs listed in this file will not be read by DataRefTool.
Here are a few X-Plane datarefs which are known to be relatively slow:
sim/airfoils/afl_cd
sim/airfoils/afl_cm
sim/airfoils/afl_cl
Buy a faster CPU! 😀 DRT is written in a highly optimized and efficient manner; however, it does a lot of work, and that work takes CPU time.
DataRefTool 2.2.0 and later use a new API for finding datarefs (when used with X-Plane 12.04 and later), and no longer rely on scanning every file for datarefs (though scanning is still used for commands).
In general, normal text editing shortcuts are respected:
In the search window, there are some additional things you can do:
Search field:
Search results:
Additional keyboard shortcuts (to open a search window, for instance) can be added by searching for "datareftool" in X-Plane's keyboard settings.
The DataRefEditor plugin has been a critical part of X-Plane development for a long time. I designed DataRefTool to help me work more efficiently, adding features as I needed them:
More details about DataRefEditor at X-Plane.com.
Adding custom datarefs: You can use DRT to display your plugin's custom datarefs or commands. Just send a message of type 0x01000000 with a pointer to the name as the payload. (This is exactly the same method that you use to add a custom dataref to Data Ref Editor.)
DRT would greatly benefit from some changes to the X-Plane SDK (Hello Laminar! 👋). Here is my SDK wishlist.
DataRefTool is made by Lee C. Baker. If you benefitted from this plugin, please consider the PlaneCommand plugin, which provides a voice control for many command aircraft commands.