• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX Help with creating my own event / variable in FSX / Simconnect C++

Messages
17
Country
spain
My problem is that I don't know the mechanics to create my own event / variable and I need help.
I have running my C ++ program that interacts with SimConnect (FSX) and my hardware with FSX events / variables.
I pretend that when I detect a window as open to generate my own event / variable in SimConnect that can be subscribed by other clients.
Also when I detect certain button presses on my hardware I can send my own events.
I have read and run some tests, but I can't create my own event.
Can someone put me on the right track with documentation or examples.
Thank you for sharing your wisdom.
 
Messages
2,077
Country
us-ohio
What do you mean by "my own event". The sim only ever recognizes events that are predefined in the SDK. All custom events are only recognized by the software that has defined them.

I think a great deal more information regarding what you're actually trying to do would be helpful for us understanding.
 
Messages
17
Country
spain
Thanks to WarpD for his reply.:)
Short description : C ++ variable propagated by SimConnect
1.- Can I create my own variable in SimConnect and access it from other clients?
2.-My C ++ program monitors whether an FSX XX window is visible or not. My C ++ WinXXopen variable reflects visible or not (True / False).
This makes my other WinOPT window visible or not.
This change in WinXXopen is intended to be notified and / or accessible by other Simconnect clients.
3.- In my C ++ program I have another variable RespVal (int).
The readings of the state of two buttons of my hardware increase / decrease the value of the variable RespVal.
This variable I also need to be accessible by other Simconnect clients.
4.- In the SDK this example SendEventA.cpp only works for me associated with the EVENT_BRAKES:

Thanks for sharing your knowledge and time.
 
Messages
17
Country
spain
Hi .. With this function: SimConnect_MapClientEventToSimEvent
Could it be the solution to my question?
Only to communicate between clients, not with the SIMU.
SDK Says:
"And will only be recognized by another client (and not Prepar3D) that has been coded to receive such events."
Thanks for answering.
 
Top