Jump to content
The simFlight Network Forums

Using Event Files


Recommended Posts

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. 😞

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.


 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • 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.