SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

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

SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Postby zillmer » Thu Apr 16, 2020 12:25 pm

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

Postby zillmer » Sun May 03, 2020 8:44 am

Hi,

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

Regards

Simon.

MachTwo
Posts: 59
Joined: Fri Oct 04, 2013 8:21 am

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Postby MachTwo » Mon May 04, 2020 5:09 pm

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: 2878
Joined: Wed Aug 24, 2011 1:37 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Postby Rob McCarthy » Mon May 04, 2020 5:17 pm

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

Postby zillmer » Tue May 05, 2020 7:01 pm

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: 59
Joined: Fri Oct 04, 2013 8:21 am

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Postby MachTwo » Tue May 12, 2020 10:24 am

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: 2878
Joined: Wed Aug 24, 2011 1:37 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Postby Rob McCarthy » Tue May 12, 2020 2:27 pm

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

Postby zillmer » Fri May 15, 2020 11:25 am

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: 2878
Joined: Wed Aug 24, 2011 1:37 pm

Re: SIMCONNECT_MENU_1, SIM_CONNECT_MENU_2 events

Postby Rob McCarthy » Fri May 15, 2020 11:36 am

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


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 16 guests