XPLMFindDataRef

XPLM_API XPLMDataRef XPLMFindDataRef(
                         const char *         inDataRefName);

Given a C-style string that names the dataref, this routine looks up the actual opaque XPLMDataRef that you use to read and write the data. The string names for datarefs are published on the X-Plane SDK web site.

This function returns NULL if the dataref cannot be found.

NOTE: this function is relatively expensive; save the XPLMDataRef this function returns for future use. Do not look up your dataref by string every time you need to read or write it.