mroschk Posted November 19 Report Posted November 19 Hello, very short question, is it possible to create a LVar using C# ? I think to remember i saw this anywhere, but could not remember... Thanks Matthias
Paul Henty Posted November 19 Report Posted November 19 45 minutes ago, mroschk said: very short question, is it possible to create a LVar using C# ? If you're using FSUIPC7 (MSFS) and the new MSFSVariableServices class then yes, you can: MSFSVariableServices.CreateLVar("L:NewLVar", 0); // (Name, Initial Value) If you're using FSUIPC6 (i.e. the legacy FSUIPCConnection.ReadLVar() method) it's possible (FSUIPC6 supports creates) but I haven't included it in the DLL. Let me know and I can a add it. For FSUIPC5 and earlier versions it's not possible to create LVars. Paul
mroschk Posted November 20 Author Report Posted November 20 Hello, i am using MSFS, but i did not know about MSFSVariableServices . Can you pls give me a little tip how to use it in a C# project ? Or is it in the FSUIPC description ? ( i am not home right now ) Matthias
Paul Henty Posted November 20 Report Posted November 20 There's an example project that explains how to use it. It also explains where to get a required file called FSUIPC_WAPID.dll that you need, and how to include it in your project. http://fsuipc.paulhenty.com/#downloads The example project is a few years old now. If it includes a FSUIPC_WAPID.dll file it could be too old to work so you should get the latest. On the MSFS side you need to install the WASM module which is installed by the FSUIPC installer. So make sure you're also up-to-date with the latest FSUIPC7. MSFSVariableServices is a completely separate system from the normal connection used for offsets. It's the preferred way to work with LVars (and HVars) in MSFS as it's hundreds of times faster than FSUIPCConnection.ReadLVar(). Paul
mroschk Posted November 20 Author Report Posted November 20 Hello, thanks a lot, that helps ! Matthias
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now