REQ: Ability to directly use BVARS

Let Sim Innovations know about your Air Manager experience and let us know about your dream feature addition

Moderators: russ, Ralph

Message
Author
bazonkers
Posts: 9
Joined: Thu Nov 16, 2023 12:14 am

REQ: Ability to directly use BVARS

#1 Post by bazonkers »

It looks like the new version of SPAD that released today has the ability to talk to BVARS directly and Axis and Ohs has been able to do it for a while. The new feature in AM 4.2 allowing rpn scripts with fs2020_rpn has been a fantastic addition and has made the creation of gauges/switches much easier as there is a ton of community work already done for many planes via rpn code. However, there are many scripts that work great on things like Stream Decks using BVARS that require additional work in AM to expose those using the XML files and LVARS.

Can we get the ability to set BVARS with rpn somewhere on the roadmap? I think it would simplify the coding process for those used to SPAD and AAO and could help more people converting to this software.

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: REQ: Ability to directly use BVARS

#2 Post by Corjan »

Hi,


Would like to add this.

Do you maybe have any knowledge on how they are doing this.
Did ms add some kind of API to simconnect, it would it simply internally converting the BVAR to a RPN script.


Corjan

bazonkers
Posts: 9
Joined: Thu Nov 16, 2023 12:14 am

Re: REQ: Ability to directly use BVARS

#3 Post by bazonkers »

Good question, unfortunately I don't know for sure. I'm guessing it might have something to do with Input Events and additions to SU13 like SimConnect_SetInputEvent but I'm on the ragged edge of my knowledge regarding how and what that is doing. I read somewhere that in SU13 it only worked in dev mode but it seems like maybe SU14 fixed that and now it's usable in the sim.

Found the posts I saw earlier regarding this info. Here is part of a thread with more details but the latest posts at the end seem to confirm my theory about it now working on SU14. Hopefully this helps steer you in the right direction.

https://forums.flightsimulator.com/t/en ... =bazonk3rs

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: REQ: Ability to directly use BVARS

#4 Post by SimPassion »

Additionally

image.png

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: REQ: Ability to directly use BVARS

#5 Post by Sling »

Please remember Air Manager is inherently a Lua based scripting platform. This needs to work using the traditional AM Lua API so being able to subscribe to Vars or write them using the standard AM API functions. which are now working well. 'm sure it can also be made to work with the RPN function but strictly speaking the RPN function was added to enable execution of some RPN that is not catered for elsewhere in the AM API. Basic reading and writing of vars is already catered for in the existing AM API and should be encouraged. So I expect it would be the same as writing an Lvar but with a B: prefix.

If anyone is interested in a tutorial on converting RPN to AM Lua I'd consider doing a video tutorial on how to and determining what's the best AM function to use for different RPN cases.

bazonkers
Posts: 9
Joined: Thu Nov 16, 2023 12:14 am

Re: REQ: Ability to directly use BVARS

#6 Post by bazonkers »

What are the downsides of using RPN code instead of lua functions? I'm genuinely asking because I'm relatively new to AM. There have been times that the rpn has been a lifesaver in regards to bus lookups and circuits which I don't think can be done in lua functions. Other times, however, RPN has been a huge timesaver and I've been able to put things together with work that I already did. Most of the time if it's simple I convert to lua.

Are there performance issues that will eventually crop up if too many gauges use RPN?

That all said, you have a good point which makes me realize what I'm really asking for is the ability to use BVARS in either/both fs2020_rpn and/or fs2020_variable_write.

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: REQ: Ability to directly use BVARS

#7 Post by Corjan »

Hi,


I think the regular write functions are a bit simpler to understand, and do have a (very small) performance advantage.
Personally I don't like the weird way that RPN scripts look, not very intuative when you are getting started.

That being said, there is nothing wrong with using RPN scripts, I get the feeling that more and more other tools in the community are starting to embrace RPN scripts.


Corjan

User avatar
Corjan
Posts: 2939
Joined: Thu Nov 19, 2015 9:04 am

Re: REQ: Ability to directly use BVARS

#8 Post by Corjan »

Do you guys maybe know if there is a easy way for me to test a BVAR?
Is there any value I could read from a stock aircraft in FS2020 to test if it works?

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: REQ: Ability to directly use BVARS

#9 Post by SimPassion »

Corjan wrote: Thu Dec 07, 2023 11:31 am Do you guys maybe know if there is a easy way for me to test a BVAR?
Is there any value I could read from a stock aircraft in FS2020 to test if it works?
Hi @Corjan, perhaps here : "MSFS SDK\Samples\VisualStudio\SimConnectSamples\SendEventB" and potentially also here : "MSFS SDK\Samples\VisualStudio\SimvarWatcher"
hope it would be a first clue ...
in any case, we have to install at least "MSFS_SDK_Core_Installer_0.23.1.0.msi" / "MSFS_SDK_Samples_Installer_0.23.1.0.msi" / "MSFS_SDK_Documentation_Installer_0.23.1.0.msi"

SimPassion
Posts: 5338
Joined: Thu Jul 27, 2017 12:22 am

Re: REQ: Ability to directly use BVARS

#10 Post by SimPassion »

Microsoft.FlightSimulator.SimConnect.dll updated from September to December release

Post Reply