• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Reading and writing Lvar from C++

Go to my website and download
p3d_xml_vars_x64
It is a gauge that you can to the panel of a test aircraft. It will allow you to scroll through all lvars active in the session, giving you the ID, the name and the current value.

I just downloaded your p3d_xml_vars_x64 but can't get it to work. I first put the p3d_xml_vars_x64.dll in the P3DV4 root folder and added a popup window in the panel.cfg file per the text file included in the download. See below:

[Window14]
Background_color=2,2,2
size_mm=354,364
window_size_ratio=1.000
position=0
visible=1
ident=10035
window_size= 0.273, 0.352
window_pos= 0.000, 0.050
zorder=0

gauge00=xml_vars!xml_vars, 2,2,350

All I got was the black background with no Lvariable data. I then moved the dll file to the gauges folder and changed the gauge info to
gauge00=p3d_xml_vars_x64, 2,2,350 with the same result. Can you or anyone provide me any insight how to gets this gauge to display the data. It sounds like an incredible tool.

Bill
 
I have the dd in the gauges folder but still no luck displaying Lvar data. Still only the black background.

I was told to enter the below into the dll.xml file:

<Launch.Addon>
<Name>XMLVars</Name>
<Disabled>False</Disabled>
<ManualLoad>False</ManualLoad>
<Path>Gauges\p3d_xml_vars_x64.dll</Path>
<DllStartName>module_init</DllStartName>
<DllStopName>module_deinit</DllStopName>
</Launch.Addon>

No luck there either. Any ideas what I am doing wrong?

Bill
 
You don't need an entry in dll.xml for a gauge.
Did you add Window14 to the list of windows at the top of panel.cfg?
Make sure you change the entry for the gauge back to:

gauge00=xml_vars!xml_vars, 2,2,350

Doug
 
Hi,
I am in a similar problem as written by roarkr in the first message of this thread.
My requirements is to have an external c++ exe to query for value of a particular LVAR(s) (by name) and the DLL module needs to respond with the current value of that LVAR(s).
I tried loading lvar_interface.dll (re-built as x64 for P3Dv4) through DLL.xml. Seems to have loaded fine (no errors in Content Error Log), but when I try to query for a LVAR value from a C++ exe by the function call
double Gbox = GetLVarByName("L:Gbox")
I am getting a memory access voilation exception.

I am able to successfully add the p3d_xml_vars_x64.dll gauge and see all the LVARs listed, but could get the values outside P3D to a C++ application.

A loadable LVAR bridging DLL module (similar to lvar_interface.dll) that can respond to an external C++ application with a queried LVAR name is what I need.
Any help from anyone who already tried something like this would be of great help.
 
Doug,

Still not getting Lvar data to display just the black popup box.

I have removed the code from dll.xml file.

Created a folder xml_var in the gauges folder and put the p3d_xml_vars_x64 into it.

I put the below popup folder in the panel.cfg file and an enter Window14 =xml_vars in the top list of the panel.cfg file .

[Window14]
Background_color=2,2,2
size_mm=354,364
window_size_ratio=1.000
position=0
visible=1
ident=10035
window_size= 0.273, 0.352
window_pos= 0.000, 0.050
zorder=0

gauge00=xml_vars!xml_vars, 2,2,350

This only gave the same black background popup.

I then changed the gauge00 entry from gauge00=xml_vars!xml_vars, 2,2,350 to gauge00=xml_vars!p3d_xml_vars_x64, 2,2,350 to match the file I put in the gauges folder and this did not work either.

This is for P3DV4 so I think I need the 64 bit DLL to make this work.

Do you see anything I missed?

Thanks,

Bill
 
I moved p3d_xml_vars_x64.dll back to the Main Gauges folder. Still no Lvar data showing just the black background.
 
Back
Top