Hi,
This past weekend I swept the dust from some old C++ code I have used to build custom DLLs; found interesting snippets from which to make a rebuilt and the result is XMLVARS.DLL. This small but powerful module enables de use of custom variables -kind of LVars- for storing and retrieving data across the entire gaugeset of an aircraft panel. Like Lvars, this variables can have any name, can hold numeric values of any kind and, unlike LVars, can also handle string values. Besides, they can handle *standard* multidimension array-style manipulation of data, a powerful tool that is not possible to work with through the native LVarset unless a complex group of macros is suited for the task.
XMLVARS supports storing and retrieving a total of 1024 different variables, with names up to 64 char, numeric values of type FLOAT64 and string values up to 128 char.It can minimize the use of repetitive code in complex gauges like FMS, Navigation Display, TCAS and similar as one of its strongest point is the ability to maintain variable values across the different gauges, like Lvars do (and most gpsvars don't). However, unlike LVars, those values still remain even after an aircraft reload, aircraft change or flight reset; something that could be useful for debugging purposes. In this case, making a RELOAD_USER_AIRCRAFT in FSX equals to make RELOAD_PANELS in FS9 (a powerful event for developers that was lost in FSX).
XMLVARS was tested in FSX under Windows Vista and Windows 7 64 bits. Despite it uses the FSX version of gauges.h, should work fine in FS9 as the base class is defined the same in both headers.
Instructions on how to install and some XML examples are included in the dowloadable zip:
* Updated, see:
http://www.fsdeveloper.com/forum/showthread.php?t=207518
Comments and suggestions are always welcomed!.
Tom
This past weekend I swept the dust from some old C++ code I have used to build custom DLLs; found interesting snippets from which to make a rebuilt and the result is XMLVARS.DLL. This small but powerful module enables de use of custom variables -kind of LVars- for storing and retrieving data across the entire gaugeset of an aircraft panel. Like Lvars, this variables can have any name, can hold numeric values of any kind and, unlike LVars, can also handle string values. Besides, they can handle *standard* multidimension array-style manipulation of data, a powerful tool that is not possible to work with through the native LVarset unless a complex group of macros is suited for the task.
XMLVARS supports storing and retrieving a total of 1024 different variables, with names up to 64 char, numeric values of type FLOAT64 and string values up to 128 char.It can minimize the use of repetitive code in complex gauges like FMS, Navigation Display, TCAS and similar as one of its strongest point is the ability to maintain variable values across the different gauges, like Lvars do (and most gpsvars don't). However, unlike LVars, those values still remain even after an aircraft reload, aircraft change or flight reset; something that could be useful for debugging purposes. In this case, making a RELOAD_USER_AIRCRAFT in FSX equals to make RELOAD_PANELS in FS9 (a powerful event for developers that was lost in FSX).
XMLVARS was tested in FSX under Windows Vista and Windows 7 64 bits. Despite it uses the FSX version of gauges.h, should work fine in FS9 as the base class is defined the same in both headers.
Instructions on how to install and some XML examples are included in the dowloadable zip:
* Updated, see:
http://www.fsdeveloper.com/forum/showthread.php?t=207518
Comments and suggestions are always welcomed!.
Tom
Last edited:






