SimConnect: what is it and how do I use it in MSFS 2020 or 2024?
- 13 min read
- 2.6k views
In short
Learn what SimConnect is, how to use it in MSFS 2020 or 2024, and how developers read, write and troubleshoot simulator variables.
In this answer
- What does SimConnect actually do?
- How do I use SimConnect in MSFS 2020 or MSFS 2024?
- Is there a SimConnect portal or SimConnect login?
- Can SimConnect run over a network?
- How do SimConnect variables and SimVars work?
- How do I read a SimConnect variable?
- How do I write a supported SimConnect variable?
- How do I find variable names, units and data types?
- Why does a variable read or write fail?
- Can SimConnect control every aircraft system?
- Why is SimConnect not connecting to MSFS?
- Can SimConnect cause stutters or control conflicts?
SimConnect is Microsoft Flight Simulator's built-in PC API for exchanging live data and commands with compatible apps. End users normally just run a supported app beside a loaded MSFS 2020 or MSFS 2024 flight; developers use its SDK interface. A normal local connection requires no separate SimConnect installation, login, enable switch or Developer Mode.
What does SimConnect actually do?
SimConnect provides a client-server connection between Microsoft Flight Simulator and external Windows software. MSFS supplies the server; each client requests selected data, subscribes to changes or sends supported commands instead of reading the screen or modifying simulator files.
- Moving maps and flight loggers read position, altitude, speed, heading, fuel use and flight-state data.
- Hardware bridges drive displays and translate physical switches, knobs and buttons into simulator commands.
- Motion and telemetry software reads attitude, acceleration and other flight data.
- Traffic utilities create, remove or monitor supported AI aircraft and ground objects.
- Automation tools monitor aircraft or environmental conditions and write values that MSFS exposes as writable.
Clients can also receive system events when a flight loads, pauses or ends. They can request one update, periodic updates or data only when a value changes, which avoids repeatedly reading the complete simulator state.
SimConnect is not an add-on manager, aircraft installer, controller driver or standalone app. Liveries and most scenery packages do not use it because MSFS loads them directly.
How do I use SimConnect in MSFS 2020 or MSFS 2024?
End users use SimConnect through a compatible companion application rather than through an MSFS menu.
- Check simulator support. Confirm that the application supports MSFS 2020 or MSFS 2024 as appropriate. Support for one generation does not automatically guarantee support for the other.
- Install every supplied component. Allow the application's installer to add its documented plug-ins, runtimes or
Communitypackage. Add a WASM module only when the developer supplies and requires it. - Load a flight. Some clients can detect MSFS at the main menu, but useful aircraft data may not appear until the cockpit and simulation are active.
- Start the companion app. Select MSFS or SimConnect if the app supports several simulators. A normal local client should discover the running simulator automatically.
- Verify changing data. Look for a connected status, moving position or altitude, or a working test control. A default aircraft is the best first test because it separates a basic connection problem from unsupported custom avionics.
Launch order usually does not matter because many clients wait for MSFS. If an app remains stuck after the flight loads, close and reopen it. Once manual launching works, our guidance on creating and checking an exe.xml launch entry explains how to start a companion automatically.
Do I need to install or enable SimConnect?
No. SimConnect is included with the PC versions of MSFS 2020 and MSFS 2024, has no master enable switch and does not require Developer Mode or the full SDK for normal app use.
Older FSX-era clients may need a legacy side-by-side SimConnect runtime supplied by their installer. Do not download an unidentified SimConnect.dll or copy DLL files into simulator folders; one client may require a different runtime from another. See our safe SimConnect installation and repair checks before changing files.
Ordinary Windows SimConnect companion programs cannot run on Xbox Series X|S or with MSFS 2024 on PlayStation 5 or PS5 Pro. A console accessory or service must explicitly support that platform rather than assuming a Windows SimConnect client can connect to it.
Is there a SimConnect portal or SimConnect login?
SimConnect has no separate web portal and no SimConnect login. A compatible local client opens an API connection to a running PC flight; the connection itself does not use a website or SimConnect account.
Microsoft, Xbox or other platform account sign-in belongs to the simulator and platform. Any account, licence page or portal requested by a third-party companion app belongs to that app's provider and is separate from SimConnect. Labels such as “MSFS Connect” may also refer to a third-party bridge or product, not to a Microsoft SimConnect portal.
Can SimConnect run over a network?
Yes. A SimConnect client can run on another Windows computer on the same local network, although a remote connection requires matching server, client and firewall settings. A local SimConnect connection does not itself require internet access.
| Connection | Choose it when | Configuration |
|---|---|---|
| Local | MSFS and the client run on one PC | Usually automatic, with no custom SimConnect files |
| Remote | The client runs on a laptop or second PC | Server address, protocol, port and firewall rules must match |
For a raw remote SimConnect setup, the simulator PC acts as the server. Its settings are normally held in SimConnect.xml, while the remote client uses SimConnect.cfg or equivalent application settings. Exact locations vary by simulator edition and installation type.
Use the simulator PC's LAN address rather than 127.0.0.1, and permit the selected port through the firewall only on a trusted private network. Never expose a SimConnect port directly to the internet. If an application supplies its own network bridge, use that documented method instead of mixing it with raw SimConnect configuration.
How do SimConnect variables and SimVars work?
SimVars are named simulator data values with documented units, value types and read/write permissions. A developer adds one or more SimVars to a data definition, requests that definition for an object, and receives the values in the same order and representation requested.
These interfaces are related but not interchangeable:
| Interface | What it represents | Typical use |
|---|---|---|
| SimVars | Simulator state such as altitude, speed, fuel quantity or switch position | Read telemetry or set a value explicitly documented as writable |
| Simulator events | Named actions or commands, sometimes with a numeric parameter | Operate gear, lights, radios and other standard controls |
| Input events | Aircraft interaction endpoints exposed by the loaded aircraft | Operate cockpit controls, including some systems not covered by standard events |
| Local or custom variables | Aircraft-specific state, often called local variables or LVars | Custom avionics and systems through a supported SDK path or bridge |
| Client data | Application-defined data blocks exchanged through SimConnect | Communication between cooperating clients or modules |
A SimVar describes state; an event normally describes an action. Writing a switch-position SimVar is therefore not always equivalent to sending the cockpit command that changes the switch, triggers sounds and runs the aircraft's system logic.
Developers need the relevant simulator SDK documentation, libraries and samples. Our explanation of installing and using the MSFS SDK covers those development components; ordinary SimConnect users do not need them.
How do I read a SimConnect variable?
Reading a SimVar requires a connection, a data definition, a request for a specific object and a dispatch handler for the returned data.
- Open the connection. Call
SimConnect_Open, retain the returned handle and continue pumping SimConnect messages through the supported dispatch method. - Create a data definition. Call
SimConnect_AddToDataDefinitionwith the documented SimVar name, unit and requested SimConnect data type. Add multiple fields in the exact order used by the receiving structure. - Select an object. Use
SIMCONNECT_OBJECT_ID_USERfor the user's aircraft. For an AI aircraft or another object, use the object ID returned by the relevant enumeration or creation response. - Request the data. Call
SimConnect_RequestDataOnSimObjectwith a unique request ID, the data-definition ID, object ID and update period. - Handle the response. In the dispatch callback, identify
SIMCONNECT_RECV_ID_SIMOBJECT_DATA, check its request ID and copy the returned fields into a structure with matching types and layout.
This shortened C++-style outline requests the user's pressure altitude once per second. Error handling and normal application setup are omitted for clarity:
HANDLE connection = nullptr;
SimConnect_Open(&connection, "Altitude client", nullptr, 0, nullptr, 0);
struct AircraftData { double altitudeFeet; };
SimConnect_AddToDataDefinition(connection, DEF_AIRCRAFT, "PLANE ALTITUDE", "feet", SIMCONNECT_DATATYPE_FLOAT64);
SimConnect_RequestDataOnSimObject(connection, REQ_AIRCRAFT, DEF_AIRCRAFT, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SECOND);
auto* reply = reinterpret_cast<SIMCONNECT_RECV_SIMOBJECT_DATA*>(message);
if (reply->dwRequestID == REQ_AIRCRAFT) { const auto* data = reinterpret_cast<const AircraftData*>(&reply->dwData); use(data->altitudeFeet); }
The callback must first confirm that the received message is object data. Copy any values that must outlive the callback rather than retaining a pointer into the returned message buffer.
Which SimConnect update period should I choose?
Use the slowest period that still meets the application's purpose. SIMCONNECT_PERIOD_ONCE suits values needed only during initialisation, while a one-second period is often enough for status panels and basic logging.
Moving maps and instruments may need a faster request or application-side interpolation. Reserve per-simulation-frame requests for genuinely low-latency uses such as motion or specialised telemetry. Where supported, requesting only changed data reduces duplicate callbacks, but a client must still handle pauses, flight reloads and values that do not change for long periods.
How do I write a supported SimConnect variable?
Writing uses a matching data definition and SimConnect_SetDataOnSimObject, but it works only for variables the SDK marks as writable.
- Confirm write permission. Check the SDK entry for the exact SimVar. Do not infer writability merely because the value can be read.
- Add the definition. Supply the documented variable name, a valid unit and the data type represented by the outgoing structure.
- Build the outgoing data. Keep its field order, type and size identical to the definition.
- Set the target object. Call
SimConnect_SetDataOnSimObjectfor the user aircraft or the intended object's valid ID. - Check the result. Inspect the returned status and continue handling asynchronous SimConnect exception messages.
The basic C++-style pattern is:
struct WriteData { double value; };
SimConnect_AddToDataDefinition(connection, DEF_WRITE, "DOCUMENTED WRITABLE SIMVAR", "documented unit", SIMCONNECT_DATATYPE_FLOAT64);
WriteData data{desiredValue};
SimConnect_SetDataOnSimObject(connection, DEF_WRITE, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_DATA_SET_FLAG_DEFAULT, 0, sizeof(data), &data);
The placeholder name and unit must be replaced with an actual writable SDK entry. For a control action, sending the documented simulator event is often better than forcing a state variable because the event allows MSFS to run the associated aircraft logic.
Complex aircraft may require a documented aircraft-specific input event, local-variable interface or supported WASM bridge. A standard SimVar write cannot be expected to control a custom FMS, display or autopilot mode that the aircraft does not expose through that SimVar.
How do I find variable names, units and data types?
Use the MSFS SDK's Simulation Variables, Variable Services and SimConnect references rather than copying an unverified variable list from an unrelated aircraft or simulator.
- Simulation Variables reference: find the exact SimVar name, index requirements, valid unit or value form, and whether it is settable.
- Variable Services documentation: check how simulator, local and other variable classes are exposed in the relevant MSFS version.
- SimConnect reference: confirm function signatures, request periods, data types, object handling, return messages and exception codes.
- SDK samples: use them to verify connection and dispatch structure before adding aircraft-specific logic.
Copy the documented name precisely, including an index suffix such as :1 where required. Start with the documented unit; use another unit only when the SDK explicitly supports a compatible conversion. The C++ field must match the requested SimConnect type: for example, SIMCONNECT_DATATYPE_FLOAT64 requires storage compatible with a C++ double.
Why does a variable read or write fail?
A failed read or write usually comes from a mismatched definition, incorrect object or request handling, simulation readiness, write restrictions or an aircraft-specific system that is not exposed through the chosen interface.
- Wrong name or index: a cockpit label, abbreviation or missing engine index is not necessarily a valid SimVar name.
- Invalid unit: use the documented unit or a specifically supported compatible unit, not an arbitrary display label.
- Type or structure mismatch: every field must match the definition's order, requested type and size. Mixed numeric and string fields make incorrect structure layout especially damaging.
- Confused identifiers: request IDs, definition IDs and object IDs serve different purposes. Reusing a number is legal only where the relevant identifier namespace and application logic allow it.
- Wrong object: the user-aircraft ID cannot stand in for an AI object, and an object ID can become invalid after that object is removed or the flight reloads.
- Flight not ready: a connection may open at the menu while aircraft-dependent data remains unavailable until the flight is loaded.
- Read-only variable: a successful read does not grant write permission. Use an event when the SDK documents an action but not a writable state.
- Unsupported custom system: the standard value may be disconnected from the custom aircraft's internal logic.
- Dispatch loop not running: requests, data and asynchronous errors will appear to vanish if the client does not keep processing SimConnect messages.
Check the immediate function result, then watch for SIMCONNECT_RECV_ID_EXCEPTION in the dispatch stream and inspect the application's own log output. Log the request ID, definition ID, object ID and HRESULT around each failing call; that usually exposes an identifier mix-up much faster than changing simulator files.
Can SimConnect control every aircraft system?
No. SimConnect can control only the variables, simulator events, input events and other functions exposed by MSFS or the loaded aircraft.
Standard gear, flaps, lights and some radio or autopilot functions often respond to normal simulator events. Complex aircraft may instead use local variables, HTML and JavaScript components, custom input events or proprietary WASM code.
A common pattern is that position, altitude and fuel data work while a custom FMS button or autopilot mode does nothing. That proves the basic SimConnect connection is operating; it does not prove that the client supports the aircraft-specific control. Test the same function in a default aircraft, then look for an aircraft profile or bridge explicitly supplied by the companion application's developer.
Why is SimConnect not connecting to MSFS?
Most connection failures are caused by client compatibility, missing supplied components, an unloaded flight or incorrect network settings, not by a disabled MSFS option.
- Load an actual flight. A client may detect MSFS at the menu but remain on “waiting for simulator” until simulation data is available.
- Restart the client. Reopen it after the cockpit loads, especially if it first tried to connect while MSFS was starting or updating.
- Try a default aircraft. If flight data works there, the original aircraft probably uses unsupported custom systems.
- Confirm version support. Update or replace a client that supports MSFS 2020 but does not recognise MSFS 2024, or vice versa.
- Install documented prerequisites. Check for the application's required Community module, plug-in or legacy runtime.
- Undo unnecessary local configuration. A local client normally needs no edited
SimConnect.xml. Back up and remove only custom configuration files that you added. - Check remote addressing. Verify the simulator PC's LAN address, matching protocol and port, private-network firewall permission and security-software quarantine.
- Test clients individually. Close traffic tools, loggers and hardware bridges, then start the failing application by itself.
For frozen data, incorrect simulator selection, firewall problems and network checks, use our fuller SimConnect connection troubleshooting procedure.
Can SimConnect cause stutters or control conflicts?
SimConnect itself normally has little noticeable performance cost, but a poorly configured client can cause stutters by requesting large definitions every frame, injecting heavy traffic or repeatedly sending commands.
If frame pacing improves when companion apps are closed, restart them one at a time and reduce telemetry, traffic or update rates where those controls exist. Developers should group related values sensibly, avoid per-frame requests for slow-changing data and perform expensive file or network work outside the dispatch callback.
If radios snap back, switches twitch or the autopilot disconnects, two command sources are probably fighting. Check for duplicate MSFS bindings, hardware software, automation tools and other SimConnect clients, then leave one active command source for each affected control.