Leaderboard
Popular Content
Showing content with the highest reputation since 10/10/2024 in Posts
-
There's no copyright claim on the original script, so I've uploaded my version of it here... Original file courtesy of Manolo Velez. You'll need to open this in the SIOC utility. Open SIOC.exe Choose "Edit Script" Files -> Import TXT (and select this attached file) Save As... (it'll compile as an .ssi file) Once compiled you may need to click the "Reload" button in the man SIOC utility window. All done! (hopefully) I'm a novice when it comes to this stuff, so I'm afraid I can offer no support. (See latest version below...)2 points
-
Hi @jonas_llubi, @Abt. I share you frustration with this. In fact, I spent the last 6 hours vibe coding an AI-assisted solution for a SIOC script that correctly handles the COM1/2 active/standby frequencies for both 25kHz and 8.33kHz frequencies. I also changed the logic so that it truly does work as a slave device, in that if MSFS changes the frequency itself (or another app like BATC etc does) then the updated frequency will appear in the panel, and it won't keep overriding MSFS. Limitations: It's really nasty code, made with the assistance of AI. Works with MSFS2020, but not yet tested for MSFS 2024. The SIOC script also doesn't appear to work for the Nav radios. I based it off the originally provided SIOC scripts from opencockpits (I'm not sure if I can share it openly with you, but there is no copyright notice on the original), and that original script doesn't work for Nav radios in MSFS2020 either. For me, the COM 1/2 radios were much more important. I can revisit the NAV modes later perhaps. In testing, the display does sometimes go black, and the panel appears to fail. To fix it, you have to just press the "Reload" button in the SIOC utility. I changed the logic so that it always initialises with the active COM1/2 frequencies from MSFS so that it doesn't reset anything if you have to restart multiple times in the middle of a flight. I hope it works as a stop-gap until something better comes along though! Edit: The NAV VOR and ADF radios don't work, but the ILS mode frequency and course values do work! If you're interested, let me know and I can send the script to you privately. Linguini2 points
-
Urgent Fix / Update Some Things slipped through, sorry for the Inconvenience! Version 0.8.9 - Fixed Lua Scripts not properly stopped/started (and therefor not working) - Fixed InputEvents.txt (detected B-Vars) not being created - Fixed Version-Check not notifying about new Dev-Builds2 points
-
A brief note to thank your and Pete for your wonderful FSUIPC product. I've been using it for about 20 years and have found it superior for controlling my aged CH products. They are still working in spite of their aging POTS while FSUIPC irons out the bumps and jerks of the old systems. Keep up the good work! Jim Driskell2 points
-
This really shouldn't happen... I have realized that I made a mistake with the 7.4.18 release...I have been testing the SDK for MSFS2024 and accidentally built the final release of 7.4.18 with the SDK from this version, instead of the version for MSFS2020. Sorry about that - I have corrected this now and have updated the installers with this correct build. Could you therefore please re-download and try again. if you get the same issue, please show me / attach your FSUIPC7.log file. Note that I have kept the version number the same, at 7.4.18, but the build date has been updated to 3rd November, so please check thar you are using this version (you may need to clear your browser cache to download this version. I have also attached this version below, but you should really re-install as the WASM has also been rebuilt. You can prevent this by setting the following ini parameter under the [General] section of your FSUIPC7.ini file: OpenOnStart=Never John2 points
-
Ah, got it. I've attached the file here but again, no big deal since I already have it working after adding FSUIPC myself. Brilliant with the discount, will get a new license right now 👍 Enjoy the rest of your weekend John and great to see you're still around in the FS community after all these years 🙂 EXE.xml1 point
-
Do you mean Hvars? And if so why is the title of this topic 'Lvars'? K-type variables are events, B-type Input Events, etc. You can use both H (HTML) and L (local) type vars in FSUIPC7, either directly or using presets / calculator code. The easiest way to use hvars is via calculator code really. There is no actual way to discover the available hvars for the loaded aircraft, as there is with lvars, so the way this works in FSUIPC7 is that you have to let FSUIPC7 know which hvars you want to use by providing a *.hvar file (some are included as an example). This is documented in the Advanced User guide, under the WASM section. Once a hvar is known to FSUIPC7, you can use it either in a macro or a lua script. But these days almost everybody uses hvars via presets (calculator code). You can define your own preset to trigger a hvar: in the myevents.txt file, e.g. Trigger_My_Hvar#(>H:hvarName) Then assigning to the preset 'Trigger My Hvar' would trigger/set the hvar ' H:hvarName'. See the documentation for further information. Also take a look at the available presets in the events.txt file as many of these will use hvars. You can find available presets by pressing the Find Preset button in the assignments windows once Select for Preset is selected/checked. John1 point
-
Thank your all you help in this. I successfully created the profiles for the aircraft--I appreciate your insights-- Robert1 point
-
Top tip. Also I never realised about the profile thing. If I got a new paint I'd have to point it to the appropriate profile. In the end I'd have l list as long as your arm of Comanches. 😂 Thanks for your time John. I expect I'll be back in the future with more 'insurmountable problems' 🙄1 point
-
Ok, then the presets should work. Ok, thanks. I should have also asked you to log the value of the lvar L:VC_POSITION_LIGHT_SW. Maybe you can do this as well for the next logs - details on how to log lvars are in the Advanced User guide (you add another section to your FSUIPC7.ini to do this...). Got to take the dogs out now and am finishing for the day. I will take a look at your logs tomorrow. John1 point
-
I don't know - I don't have this aircraft. Have you tried it? Use the Add-ons->WASM->Execute Calculator Code menu option, and try sending each of the following: 30 (>L:VC_Miscellaneous_trigger_VAL, number) 31 (>L:VC_Miscellaneous_trigger_VAL, number) to see if those move the switch. They should work, as that lvar controls the dome switch (with parameters 38 and 39). Also try the following: 10 (>L:VC_POSITION_LIGHT_SW, number) 0 (>L:VC_POSITION_LIGHT_SW, number) 20 (>L:VC_POSITION_LIGHT_SW, number) to see if those move the switch. If they work, we can simplify the assignments. If you still have issues, please activate WAPI Debug level logging (Log -> WAPI -> Debug) and logging for Buttons & Keys, and show me / attach your FSUIPC7.ini file and FSUIPC7.log file, the latter showing you using the assigned buttons. And always exit FSUIPC before attaching files please. John1 point
-
Yes - sorry, I forgot to add the conditional letter 'C and the conditional comes after the press 'P' letter'. Should be 7=BA002=10 CP(+M, 29)M,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 8=BA002=10 CP(+M, 28)M,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}-1 point
-
Ok, then we have: Nav switch Down, Strobe Switch Down: VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) Move nav switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move strobe switch up: VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) Nav switch Down, Strobe Switch Up: VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) Move Nav switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move strobe switch down: VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) Nav switch Up, Strobe switch down: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move Nav switch down: VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) Move strobe switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Nav switch up, strobe switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move nav switch down: VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) Move strobe switch down: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Re-arrange these by switch movement: Button 26 (nav switch up): set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 20 set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 0 Button 27 (nav switch down) set VC_POSITION_LIGHT_SW = 20 when VC_POSITION_LIGHT_SW = 10 & strobe switch down set VC_POSITION_LIGHT_SW = 0 when VC_POSITION_LIGHT_SW = 10 & & strobe switch up Button 28 (strobe switch up) set VC_POSITION_LIGHT_SW = 0 when VC_POSITION_LIGHT_SW = 20 set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 10 (i.e. no change) Button 29 (strobe switch down): set VC_POSITION_LIGHT_SW = 20 when VC_POSITION_LIGHT_SW = 0 set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 10 (i.e. no change) Note that button 27 is the only state change that needs a dependency on the state of another button as the VC_POSITION_LIGHT_SW value condition is the same. The next thing to determine if you can write to the lvar VC_POSITION_LIGHT_SW ti change the position? If so, this makes things easier, as you can then just write to the offset holding the lvar to change the position. But, as you said you need to use VC_Miscellaneous_trigger_VAL (with 30 for up and 31 for down) we will use that, So, define 4 presets (in your myEvents.txt file): //iFly/737-Max8/Lights Nav_Strobe_Switch_Up#30 (>L:VC_Miscellaneous_trigger_VAL,number) Nav_Strobe_Switch_Down#31 (>L:VC_Miscellaneous_trigger_VAL,number) Nav_Strobe_Switch_Up_Two#30 (>L:VC_Miscellaneous_trigger_VAL,number) 30 (>L:VC_Miscellaneous_trigger_VAL,number) Nav_Strobe_Switch_Down_Two#31 (>L:VC_Miscellaneous_trigger_VAL,number) 31 (>L:VC_Miscellaneous_trigger_VAL,number) I am not 100% sure about the _Up_Two and _Down_Two presets: we need to move the switch two positions for some assignments, but setting the same value to an lvar twice in the same calculator code string may not allow this. If not there are a few other things to try (see below). Now we can define our assignments: For Button 26, send switch-up when when VC_POSITION_LIGHT_SW = 20, and switch down when VC_POSITION_LIGHT_SW = 0 to send a switch up, using B as your Bravo device letter and starting the indices from 1 will give the following assignment entry: 1=PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control}- then add the offset condition on the value of VC_POSITION_LIGHT_SW held in offset 0xA002 1=BA002=20 PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control}- Next, we can duplicate that, change the index number, the preset and the offset condition for the switch down when VC_POSITION_LIGHT_SW = 0: 2=BA002=0 PB,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- Doing this for each button 27, we get: 3=BA002=10 PB,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 PB,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- and then we need to add the additional condition on the strobe switch position (buttons 28 and 29): 3=BA002=10 CP(+B, 29)B,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 CP(+B, 28)B,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- Doing this for all buttons, we end up with: 1=BA002=20 PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control} 2=BA002=0 PB,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 3=BA002=10 CP(+B, 29)B,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 CP(+B, 28)B,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 5=BA002=20 PB,28,CPNav_Strobe_Switch_Up_Two,0 -{Preset Control} 6=BA002=0 PB,29,CPNav_Strobe_Switch_Down_Two,0 -{Preset Control}- So try that - just paste those entries into your profile buttons section, and change the joystick letter to the one you are using (also in the compound condition) and also make sure the index numbers are unique in your section. If the presets to move two positions don't work, you could try the following instead: 1=BA002=20 PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control} 2=BA002=0 PB,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 3=BA002=10 CP(+B, 29)B,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 CP(+B, 28)B,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 5=BA002=20 PB,28,CPNav_Strobe_Switch_Up,0 -{Preset Control} 6=BA002=20 PB,28,C1152,5 -{pause (ms)}- 7=BA002=20 PB,28,CPNav_Strobe_Switch_Up,0 -{Preset Control} 8=BA002=0 PB,29,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 9=BA002=0 PB,29,C1152,5 -{pause (ms)}- 10=BA002=0 PB,29,CPNav_Strobe_Switch_Down,0 -{Preset Control}- Here we are sending he preset twice, with a short pause between each one. The trick here is to get the pause large enough so that both presets are executed, but small enough so that the update of the lvar has not been received yet to update the value in the offset condition on 0xA002. I have used 5ms - you can use logging to determine if this needs to be increased or decreased (probably increased if anything - try 10ms next and so on). Give those a try and let me know if either works as expected. John1 point
-
Yes, I understood. Just trying to point out that when using two switches, one for each light, its never going to work in the same way as one 3-position switch to control the lights. The honeycomb light switches are designed for on/off of each of the lights, so however you implement this is going to be a fudge, but maybe ne that you can live with. And no need for the pictures either... Yes, that's fine. No, but you can assign to a preset and then make that assignment conditional on an offset value. Or just also add the lvar VC_Miscellaneous_trigger_VAL to an offset, and just use assignments with offset conditions, as I advised. If you can just tell me what you want the switch position to be in the UP/UP state I can show you how to do this - its easier to do it this way than in lua.1 point
-
Better to keep the terminate function - always a good idea to close com connections. Cheers, John1 point
-
Ok, thats interesting - and I also don't understand why this would fix your issue - maybe there was an option you set that disabled this for some reason. But glad its now fixed! Maybe try comparing the old prepar3d.cfg (if you saved it) to the new one, to see what has changed that could affect this.1 point
-
Not doing too bad, thanks. And yes, I try to remain hopeful, but seems to get harder by the day...!1 point
-
This was released in version 7.5.2, on 14th February. From the FSUIPC7 Offset status document: Looks like I forgot to add this to the changes.txt and history document - sorry about that, I will correct this. John1 point
-
FSUIPC7 7.5.3 and likely other external apps using SimConnect and crashing FS24 SU3 1.5.10.0 are solved in FS24 SU3 1.5.12.0 It was even mentioned in the release notes! For now I a happy simmer again.1 point
-
1 point
-
Glad you got this working! Yes, doing that should have given you a lot if insight in how and why to use such functionality as assignment overloading, adding lvars to offsets, and using offset conditions, That should be useful for future complex assignments. The lua script is also not a bad solution, but this is probably more resource efficient and will execute faster, as it won't have the thread creation overhead (as all lua scripts are ran in separate threads). No problem - and thanks for the update. John1 point
-
Thanks John Followed your instructions and now works great Thanks for your time and knowhow. I started Flight Sim about 20 years ago and using the mouse didn't appeal so building switch panels became part of the hobby, but it was only with FSUIPC with yourself and Pete (hope he is keeping well) that i could get them to work. Kind Regards Brian1 point
-
Thank you, I moved FSUIPC to starting first, and changed the MaxClients to 128. Now Everything is working well.1 point
-
I've been struggling with this BlackSquare mixture thing for ages. Today, thanks to this thread, I've cracked it! As John said earlier, "Why not? Have you tried? It is incredibly easy and explained well:' I've used FSUIPC since forever and I maintain that it's like brain surgery, Easy when you know how. 🤣1 point
-
I am not sure how to embed a pause/wait in a calculator code string and that sleep syntax is not familiar to me. There are a couple of other ways you could do this: 1. Use lua instead, e.g. ipc.execCalcCode("23 (>L:VC_Miscellaneous_trigger_VAL, number)") ipc.sleep(100) ipc.execCalcCode("25 (>L:VC_Miscellaneous_trigger_VAL, number)") 2.Define two separate presets: IFLY_RWY_ONa#23 (>L:VC_Miscellaneous_trigger_VAL, number) IFLY_RWY_ONb#25 (>L:VC_Miscellaneous_trigger_VAL, number) and then create a macro to call the first one, then pause (using the FSUIPC-added pause control), then call the second preset. You can also overload the assignments instead of using a macro if you prefer.1 point
-
Ah, good to know John, I was not aware there is a little delay. Glad I could help and thanks again for all you do. Regards,1 point
-
Thank you for this... The above "Pause" control (c1152) idea was a perfect solution to operate multiple switches in the PMDG 737's and 777's in both MSFS2020 & 2024. I was experiencing the same symptom where only the last sequential switch in a group would operate. Adding the pause control allows all sequential switches to work as expected. Regards,1 point
-
Yes, but it is a different sim, and I have no idea what the issue currently is - previously it was due to the WASM not starting, which looks to be due to the strange permissions issues you are having. Are these now solved after a re-install? Did you try renaming the Community folder as I suggested? I really cannot help you if you do not tell me what you are trying and at least answer my questions - I have no idea what you have done and what the current state is... Is the WASM now running? Is an FSUIPC_WASM.log file now generated? Do you still have the same permissions issues? I am still waiting for this information and to see a log file if available....if the WASM isn't running, then you need to determine why, and if it the permissions are still an issue.1 point
-
You can start MSFS via steam or however you like. The default auto-start is via the EXE.xml file, although you can select to auto-start via the bat file. By default, the desktop icon(s) installed by the installer just show a splash crean and call steam to start MSFS. If you are using the EXE.xml auto-start and dont want to use the installed desktop icon to start MSFS, you can opt not to have this installed by unchecking the checkbox at the end of the installation process. John1 point
-
John, thank you. I modified the FSUIPC.ini file to add the CONNECTED (Spad.next) and READY (Vpilot) on the RUN instructions, and to adjust the DetectToConnectDelayAuto as per the link you provided (the value now set for me is 86). Now everything is working well. Thanks a lot for your help Ezio1 point
-
When FSUIPC7 is auto-started, 'Exit with FS' is always set and the options menu entry for this is removed.1 point
-
I have added the LIVERY NAME simvar to offset 0x2480 (128 bytes) in the attached version if you would like to try it. This offset will only b populated in MSFS2024 and not in MSFS2020. John FSUIPC7.exe1 point
-
I did look at it. I didn't know "Path of Flight Simulator installation" == "InstalledPackegesPath". I meant look at the value in the offset, i.e. log its value. I will update the offset status document to make this clear. Cheers, John1 point
-
Trim wheels usually work on buttons, not an axis. Some have two buttons in each direction (one for fast movements and one for slow), others just one. For those using just one button, you can use the Rotaries.lua script to convert this to use two virtual buttons instead, to enable fast/slow trim in each direction. The Bravo trim wheel has one button in each direction. I showed how to configure the Bravo for basic operation, including the trim wheel, in the following post: That should work for quite a few aircraft, but it won't work for all aircraft, especially many add-ons, as those assignments use the default FS controls. For such aircraft, you should use a profile and override these with the specific controls for that aircraft, whatever they may be - usually using presets, input events or lvars. There are also many other ways yo assign trim, and it is up to you to decide what works best for the aircraft you are using. For example, see the following post: John1 point
-
Hello John, And to confirm above : "my traffic" on ND has also returned with fsuipc 7.5.x ! Thanks for the help. Have a good Christmas and a happy New Year, Regards, Marinus Bergsma.1 point
-
Yes, very strange... I will be releasing 7.5.1 later today, and I am going to switch to using version numbers on the downloadable file which should help with this cache issue. Cheers, John1 point
-
You should use FSUIPC's logging facilities to work out what is happening. Set logging for Buttons & keys, open the logging console and see what is logged when you press the buttons - this should tell you what is happening. But if button 0 is already pressed when you press button 1, line 34 will NOT be triggered as that assignment is on button 0. Assignments are only triggered when the main/assigned button is pressed/released, not when the compound condition is changed. So, assignment 34 should be on button 1 with the compound condition on button 0 being pressed, i.e. 34=CR(+0,0)0,1,K190,8 -{Key press: .>key}-1 point
-
There is no point adding that line again if its already there, and that is to dix a specific problem - to fix issues with 3rd-party programs that are expecting a value in that offset even when FSUIPC is not connected to the FS (i.e. basically for software not yet updated for MSFS2024). If you get any issues with a new release, you should always raise a new support topic. John1 point
-
Sorry but can you please five your topics a more appropriate title... I will update it... 7.4.18 attached below - save and remove the .7418 extension... John FSUIPC7.exe.74181 point
-
Would have been helpful, can't replicate that: - Created a Simple Button Action (Control, 65798, no Toggle) on 0.7.12 - Installed 0.8.4 - Checked Action: Toggle still disabled So for the Moment I can just assume you had actually set a Toggle Switch unintentionally. And that a Setup of Toggle Switch enabled +no Alternate Command+ no Monitor Address + no Monitor Value/Comparison just behaved differently with a on pre-0.8.0 Versions 🤔1 point
-
Hi Paul, My app is for airline pilots so I am aways using complex aircraft at complex airports. MSFS2024 is still rather flakey so I think I will hold off on further testing until things stabilize more. Thanks for your assistance. Rob1 point
-
I haven't got time now to do a proper beta release, will do this tomorrow. but for now can you try the attached version, which is 7.5.0a. This is for both MSFS2020 and MSFS2024. I wo; release this in the Announcements sub-forum tomorrow. John1 point
-
Hi John, Thanks for the quick reply. Your suggestions verify what I had thought so I'll give it a try. As usual, your support is par excellence. Jim Driskell1 point
-
That is the install location for FSUIPC5 and earlier versions. From FSUIPC6 and onwards, you must select/choose the installation location - if you don't, a default location will be used - maybe now C:\FSUIPC6 but in earlier versions it was under the P3D add-ons folder, under Documents. John1 point
-
I experienced the exactly same problem when I had a new programmable keyboard that has rotary encoder, where inputs were very unreliable probably due to the too short interval between keydown and keyup events. After I added " UseKeyboardHook=Yes" to the ini file, FSUIPC works like a charm to capture the encoder input. Thanks!1 point
-
There is a developer named Oudoum working on a solution to allow FDS (and some other) hardware to work with FSUIPC and with PMDG 737 (and 777). It is called Device Interface Manager. It is available here: https://github.com/Oudoum/DeviceInterfaceManager and there is a live Discord channel for latest discussion and feedback. https://discord.com/channels/1024920961939669052/1236087452637204571 Cheers!1 point
-
Ok, thats good to know...and rather surprising! At least the installer needs to be updated to install the auto-start component. You could try manually adding the FSUIPC7 entry to the MSFS24 EXE.xml file, which should enable the auto-start. Did you try installing the FSUIPC WASM module into the MSFS2024 Community folder? Just copy from your MSFS2020 Community folder. This is needed for the functionality for presets, lvar & hvars. Well, they always have been, hence the need for presets... Anyway, I will review the MSFS2024 documentation on the available events/controls, when available. John1 point
-
1 point
-
Sorry, I should have been clearer - would you be able to put the same 'ground altitude' fix into FSUIPC6?1 point
-
Background PMDG Aircraft for FSX and P3D do not typically use the normal controls provided by the flight sim. This means that many of the aircraft's switches cannot be assigned to buttons and keys using the list of controls in the FSUIPC dropdown boxes. Assigning a standard control in FSUIPC will likely do nothing in the PMDG aircraft when the button or key is pressed. Solution Instead of using the standard list of controls shown in the FSUIPC dropdown box, users must use a different set of controls provided by PMDG for the specific aircraft. These are known as custom controls (or custom events). The custom controls vary for each aircraft and are listed in the SDK that is installed alongside the aircraft. This guide will show you, step-by-step: How to find the SDK files How to calculate the custom control numbers How to work out the parameter value How to assign the control to buttons/keys in FSUIPC The specific examples shown will be taken from the PMDG 737NGX, but the same method works for any PMDG aircraft with an SDK and custom controls (e.g. 777, 747). 1. Locating the SDK From your main Flight Sim install folder, or your MSFS Community folder, and open the PMDG aircraft folder Then select the folder belonging to the aircraft you want to use. e.g. PMDG 737 NG3 or pmdg-aircraft-737 Then select the SDK folder or Documentation\SDK folder for MSFS2020 Locate the file with the .h extension. For the 737 it's called PMDG_NG3_SDK.h (or maybe PMDG_NGX_SDK.h, depending on the sim and variant you are using) You can open this file with Notepad or your favourite text editor. As an example, the document you need for the 737 in MSFS2020 will be: [Community]\pmdg-aircraft-737\Documentation\SDK\PMDG_NG3_SDK.h 2. Calculating the control numbers 2.1. Find THIRD_PARTY_EVENT_ID_MIN The first thing to find is the definition of THIRD_PARTY_EVENT_ID_MIN. Search for the following text: #define THIRD_PARTY_EVENT_ID_MIN You will find a line like this (from the 737 file): #define THIRD_PARTY_EVENT_ID_MIN 0x00011000 // equals to 69632 Note the decimal value at the end. In the case above it's 69632. You will need this value to calculate the control number in the next step. 2.2. Find the control you want to use. Search for the control by name, or look through the listed controls to find the one you want. They are helpfully grouped together by panel. The controls are listed under a comment: // Control Events You can search for this to find where the list of control numbers starts. As an example we'll use the Autopilot CMD A swtich on the MCP. This is the relevant line in the 737 SDK: #define EVT_MCP_CMD_A_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 402) To calculate the control number for this switch we just add 402 to the value of THIRD_PARTY_EVENT_ID_MIN we found earlier. 69632 + 402 = 70034 We have now calculated the control number. We will use this in step 4 to program the button/key. 3. Finding the parameter value PMDG controls need a parameter value. These can one of type types: 3.1. Mouse Click Codes (Shown in the example) You can use these to simulate a mouse click on the particular switch. Mainly it will be the left mouse button, but other clicks types are available (e.g. Right button, left double click etc). To find the codes for each type of click, search for MOUSE_FLAG You'll find a block of #define statements for each type of mouse click. Here are a couple of examples from the 737 sdk: #define MOUSE_FLAG_RIGHTSINGLE 0x80000000 #define MOUSE_FLAG_LEFTSINGLE 0x20000000 Find the click that you want to simulate and get the code. For example, we'll have our key assignment simulate the left mouse button clicking on the CMD A autopilot button. So we'll need 0x20000000 as the parameter value for the control. 3.2. Direct Values (Not shown in the example) Alternatively, some controls can accept a direct value to set the switch to a specific position. To find the direct values you need to look at the top part of the .h file to find the switch definition. These are named differently than the events so you need to search. Taking the battery selector switch as an example, we find the control: #define EVT_OH_ELEC_BATTERY_SWITCH (THIRD_PARTY_EVENT_ID_MIN + 1) For the parameter value we can find the same switch in the top part of the .h file: unsigned char ELEC_BatSelector; // 0: OFF 1: BAT 2: ON This tells us that in addition to mouse clicks, we can also send direct values. In this case: 0 for the OFF position, 1 for the BAT position and 2 for the ON position. It's possible to make a key or button set the Battery Selector directly to the ON position by setting the parameter value to 2 instead of a mouse click code. Simple ON/OFF switches will not have values listed (and will be declared as 'bool'). For these types of switches you can just pass the value 0 for OFF and 1 for ON. 4. Assigning the control to a button or key in FSUIPC Select the [buttons + swtiches] or [key presses] tab in FSUIPC and select the button or key to program. From the "control sent..." dropdown select <custom control> (it's near the top of the list) A popup window appears asking for the control number. Type in the control number you calculated in step 2. For our 'autopilot CMD A' example, we enter 70034 and click OK. The controls dropdown box will now show the control number in angled brackets. In the "parameter" box (below the controls dropdown), enter the parameter value from step 3. This can be a mouse click code or a direct value. Mouse Click Codes: Do not include the first 0 from the number listed in the PMDG SDK. Start with the x. With our example, we would enter x20000000 for the left-button single-click. Note that this code is in hexadecimal. FSUIPC will convert it to the equivalent decimal value. This is nothing to worry about. It's the same number. Entering the value in Hex is more convenient. Direct Values: Just enter the value as a number. Do not add the x at the start like mouse codes. If you're programming a key press, remember to press the [confirm] button. Here is our example control assigned to a button in FSUIPC: Your button or key press should now operate the switch in your PMDG aircraft.1 point