SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
zillmer
Posts: 14
Joined: Wed Jan 03, 2018 4:57 pm

SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by zillmer »

Hi,

I have an app that amongst other things triggers programmatically the selection of items in SimConnect generated text menus by mapping the SIMCONNECT_MENU_1, SIMCONNECT_MENU_2 and so on events to a client event in my code and then using SimConnect.TransmitClientEvent to transmit the event.

This worked perfectly in P3DV4, but it seems that these events no longer function/exist in P3DV5; I'm not getting any exceptions or errors when I either map the event or transmit it, but it simply has no effect in P3D.

Was this by design or by accident?

Regards

Simon.
zillmer
Posts: 14
Joined: Wed Jan 03, 2018 4:57 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by zillmer »

Hi,

Just a bump to note that this has not changed in HF1.

Regards

Simon.
MachTwo
Posts: 68
Joined: Fri Oct 04, 2013 8:21 am

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by MachTwo »

Another bump on this issue. We were really hoping to see this fixed in HF1.
Andrew Wilson
Flight Sim Labs, Ltd.
---------------------------
www.flightsimlabs.com
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3704
Joined: Wed Aug 24, 2011 1:37 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by Rob McCarthy »

Hi Simon,

Would you be able to PM me a link to a sample to reproduce this issue?

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
zillmer
Posts: 14
Joined: Wed Jan 03, 2018 4:57 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by zillmer »

Rob,

Not sure what of kind of link you are looking for, but I'll describe the situation.

I have an application, written in C# so using managed simconnect.

In the application I use the following code once I've connected to P3D.

_simconnect.SubscribeToSystemEvent(Events.TEXTWINDOW, "TextEventCreated");
_simconnect.MapClientEventToSimEvent(Events.SIMCONNECT_MENU_1, "SIMCONNECT_MENU_1");

In very simple terms the first line enables me to detect when a 3rd party application uses SimConnect to display text, or specifically a menu.

I then read the detail of that menu and transmit it via a TCP/IP link to an iOS/Android App.

My users can then click on the menu in the iOS/Android App the option they want to select, which is then messaged back over TCP/IP to my application. My application then 'selects' the menu option they have clicked on by using:

_simconnect.TransmitClientEvent(SimConnect.SIMCONNECT_OBJECT_ID_USER, Events.SIMCONNECT_MENU_1, 0, GroupID.GROUP1, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);

In P3DV4, this results in the 1st menu option on the SimConnect menu being selected. I developed the application in mid 2018 so this has worked in v4.3, v4.4 and v4.5.

When I run the same application on P3DV5, all of the simconnect functionality works exactly as before. No simconnect error is generated when I subscribe to the events, I get notified of the TextEventCreated event, I can decode the menu and so on. However when I call the TransmitClientEvent method, there is no response in P3D. The menu option is not selected, and no simconnect error is generated.

If you need something tangible I might be able to work up a very simple test harness to demonstrate the difference between v4 and v5.

Regards

Simon.
MachTwo
Posts: 68
Joined: Fri Oct 04, 2013 8:21 am

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by MachTwo »

Please could we see this resolved for HF2? It would be very appreciated by our customers.
Andrew Wilson
Flight Sim Labs, Ltd.
---------------------------
www.flightsimlabs.com
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3704
Joined: Wed Aug 24, 2011 1:37 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by Rob McCarthy »

Hi Simon,

If you could provide a code sample displaying the issue that would be helpful. Are you seeing the SendEventA SDK sample function as expected? This also uses the SimConnect_TransmitClientEvent call.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
zillmer
Posts: 14
Joined: Wed Jan 03, 2018 4:57 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by zillmer »

Rob,

Here is a link to a VS Solution with some sample apps to demonstrate the issue. There is a word doc included that gives some instructions and some pointers to the relevant code snippets.

https://thebeeches-my.sharepoint.com/:u ... A?e=eQn4t5

The TransmitClientEvent function is working fine with most events, it's just the SIMCONNECT_MENU_x events that don't seem to work.

Regards

Simon.
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3704
Joined: Wed Aug 24, 2011 1:37 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Post by Rob McCarthy »

Hi Simon,

Thank you for the sample. We'll take a look at this and get back to you.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
Post Reply