The SimConnect API can be used by programmers to write software add-on components for Prepar3D. Add-on components for Prepar3D can be written in C, C++, or, if the managed API calls are being used, any .NET language such as C#.net or VB.net. Typically the components will perform one or more of the following:
- Add the processing for a new complex gauge, or other instrument, to Prepar3D.
- Replace Prepar3D processing of one or more events with new logic.
- Record or monitor a scenario.
- Extend the scenario system of Prepar3D.
- Create and set the flight plans for AI (non-user) aircraft.
- Set different weather systems.
- Enable new hardware to work with Prepar3D.
- Control an additional camera that the user can optionally select to view.
References Overview article.
The design of a SimConnect software add-on components involves writing a client to communicate with a server running within Prepar3D. The client opens up communications with the server, then requests which events and object information should be passed to it. The client then waits for the request to be received from the server, and then processes its response appropriately.
The recommended method of writing a software add-on component is to build it out-of-process, as an application (i.e. an .exe file) rather than in-process, as a library (i.e. a .dll file). This is because out-of-process applications provide more stability, if they crash they will typically will not crash Prepar3D, and are easier to build, test and debug. Out-of-process also supports managed code, and therefore applications can be written in .NET languages which ease building complex user interfaces and can expediate the development process.
To get started, learn about how to create either native or managed SimConnect applications:
For a quickstart, follow alongside these tutorials on creating SimConnect applications:
SimConnect makes extensive use of ID numbers defined by the client. There are ID numbers for requests, data definitions, events, groups, and so on. These ID numbers should be unique for the client. Re-using an ID will result in the previous call using that ID becoming obsolete, and ignored by the server.
Only one version of Prepar3D can be running on one computer at a time, so a client installed on a local machine will only be communicating with one server.
However it is possible to have one client communicate with multiple copies of Prepar3D, running on a network.
Samples Overview article.
Configuration Files Overview to learn about the supported configuration options.