mroschk Posted Tuesday at 10:58 PM Report Posted Tuesday at 10:58 PM 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 Tuesday at 11:58 PM Report Posted Tuesday at 11:58 PM 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 yesterday at 12:06 AM Author Report Posted yesterday at 12:06 AM 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 yesterday at 12:17 AM Report Posted yesterday at 12:17 AM 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 11 hours ago Author Report Posted 11 hours ago 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