Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi.
Is it possible to use the events from the .evt file with C#?
I'm using A320FBW and there is a .evt file that contains the events I want, but I don't know how to use them.
For example:
[Events]
0=MobiFlight.A320_Neo_MFD_BTN_CSTR_1

(I have the mobiflight wasm installed.)
How can I use them with C#?

I appreciate any help, I lost hours and I didn't find a solution. 😞

Posted

I can't really say at the moment because I don't know what these are. I don't know MobiFlight.

Are these LVars or HVars that are being triggered somehow? If so you can access them with my FSUIPCClient dll. 

If these are plain SimConnect events then you'll need to use the SimConnect API rather than FSUIPC. Using the .NET SimConnect wrapper isn't easy however and while there was one for FSX and P3D, I don't know if Asobo have made one for MSFS. If not you'll need to use C++.

I have the FBW A320 so I'll have a look at its lvar list and see if I can see that variable. I'll report back later today.

Paul

 

Posted

Hi Paul,
Maybe I explained it wrong and I found some information on the subject.
In the FSUIPC place is a folder "EventFiles", In that folder are .evt files like "A32X-FBW1.evt" that are read by fsuipc after being copied to the executable location or declared in "fsuipc.ini".
Example:

[Events]
0=MobiFlight.A320_Neo_MFD_BTN_CSTR_1
1=MobiFlight.A320_Neo_MFD_BTN_WPT_1

I saw that these events can be used as controls.
The control numbers for events in event files are determined as follows:
       control number = 32768 + (event file index)*256 + event index number

I thought I could use these events as H/LVars with mobiflight wasm or in other way, but I think I can't, they have to be used as controls. It's correct?

I saw this information in John Dowson reply to other topic.


 

Posted

Ah, okay that's clear. I'd not heard of .evt files before.

In that case you can use my DLL to send the control number (also called Event ID):

FSUIPCConnection.SendControlToFS(eventID, parameter);

Most controls will not take a parameter value, so just pass 0.

You'll just need to calculate the ID number as described. So if that's your only .evt file then 

A320_Neo_MFD_BTN_CSTR_1 will just be control number 32768.

A320_Neo_MFD_BTN_WPT_1 = 32769 etc...

Paul

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.