EXTRACTING  and  INPUTING  DATA,    FSX and FS9. 

Some working programs for FSX and FS9

Source code examples for FSX and FS9

Accessing the Com.Port with VB.net 

 

                            

Overview.

Extracting data from Fight sim  for the “hands on” simmer has been a hit and miss affair for years with FSUIPC (or FSConnect for FS9) being the only way for a “non programmer” to extract or input the required data.  That all changed with SIMCONNECT being added to FSX. (Although the SDK is only in the deluxe version).  Now you can easily extract (or input) data from FSX by going thru simconnect in a  multitude of languages.

 

My Testing of these ,,,

I use Windows XP prof. sp2,,  FSX sp1 ,,, FS9 sp1 ,,, Visual Studio 2008 Express C# , Visual basic and C++ ,,,  Net framework 3.5 ,,, VB6 prof  & Luck.

FSUIPC is NOT used in any of this software. I state that as it seems to be the first question people ask me. !!!!

I am not a programmer ,, I “flounder along” doing what I need to do for my own sim. I share what I do.

 

Link2fs inOut.   For FSX and FS9   (Source code NOT included) 

A newer program on the block is my “Link2fs_inOut” which extracts data from FSX or FS9 and sends the required data thru a serial port to whatever you have on the other end.  It is initially made for the Arduino cards but can be used with any card that is serial based and you can program its activity.

The other thing this can be used for is hooking 2 computers together and transferring the required data to the second computer for use for a particular purpose. For instance,,  a motion platform controller.

The data traffic is all in ascii format (normal readable characters) for both the “in” and the “out”.

A bonus is,, you can send inputs as keystrokes from your board or the other computer back to FSX or FS9 to do whatever you want.

In FSX mode the extractions are “Live” ,,  in FS9 mode the extractions are polled.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


I have a separate page for this program here ,,   http://www.jimspage.co.nz/link2fs_inout.htm

 

Link2fs_Com.   (Extraction FSX only) (Source code NOT included) 

A stand alone program for extracting data from FSX and outputting that data to a serial port.

This program will shoot all the chosen FSX data out of a chosen serial port.  The idea here is some-one can use the data on another computer to drive a program for a motion platform (or whatever).  What data is actually poked out the serial port can be selected by the user by ticking the box’s to suit.  The output data stream is in ascii and is comma delimited.  This is at frame-rate speed so it can be a LOT of data for the other computer to process. There is provision to save and recover different profiles to suit different setups.

The serial output is  115200,n,8,1

 

 

 

 

 

 

 

 

 

 

 

 

 


Use at your own risk.

You can down load the files here …..   http://www.jimspage.co.nz/link2fs_com_a.zip 

Tested with FSX on XP 32 bit,, Vista 32 bit and Windows 7 32 bit and 64 bit.

The FSX SDK is NOT required.

FSUIPC is NOT required.

 

 

SOURCE  CODES   AND   EXAMPLES.

Included in the Simconnect SDK (FSX deluxe only) there are sample codes using the .NET protocol so I wont go into them here. 

Brian Gefrich has done a wonderful introduction into C# ways of interfacing with simconnect.

His tutorials are on the right hand side of this page.

http://web.archive.org/web/20080116215704/http://www.notasenator.com/blog/

I just want to cover the “hobby” simmer that has a wee bit of knowledge in programming and in doing so I have produced some  “Starter” projects so budding programmers can get some hints on extracting and inputting data using VB6 ,, VB.net and C#.net. All the samples are listed below.

 

 

C# (C sharp)  jims8buttons ,,,, 

This basically shows a developer how easy it is to directly interface with FSX simconnect using C#.net.

It’s not much use by itself but shows a programmer how the simconnect  interface  works.

I purposely used “awkward” stuff to try to cover all the different types of extractions and inputs that would commonly be used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


What I used ,,,,,

1/.. I used Microsoft C# 2008 express edition, although this should ?? convert to the latest 2010 version,, but I don’t know ,,,  never tried it.

The 2008 versions are still available here ,,,

http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express 

2/.. Microsoft Net Framework 3.5 or higher.  (Its probably already on your computer if you use automatic updates from M$) It does run and compile targeting Net framework 2 so you could try if you only have net framework 2.

To check which framework version you've got ,,,  open "Control Panel",  click on "Add or Remove Programs" and see if it shows up.

3/.. MS FSX with or without any service packs. (Although I had service pack 1 installed)

 

You can download the complete C# project with source code here ,,,,,

http://www.jimspage.co.nz/cs_fsx_jims8buttons.zip

 

 

 

VB.net   jims8buttons FSX  ,,,, 

This basically shows a developer how easy it is to directly interface with FSX simconnect using VB.net.

It’s not much use by itself but shows a programmer how the simconnect interface  works.

I purposely used “awkward” stuff to try to cover all the different types of extractions and inputs that would commonly be used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


For this project I used Visual Basic 2008 Express Edition ,, available here ,,,,  (Free)

http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express

Also net framework 3.5

This project is shared in TEXT FORM along with full instructions.

Those more cunning programmers will understand that a text version that has FULL documentation with it, is far better because even a real novice can start a project from scratch and understand EVERYTHING within the project.

Using a text version introduces you to the “inner workings” of a project without you having to “flounder around” and find them out for yourself.

 

My source code (a complete VB.net project in text form) available here ,,,

http://www.jimspage.co.nz/vbnet_fsx_8buttons_text.zip

 

 

 

 

VISUAL BASIC 6  FSFDT METHOD. (VB6  FSX only) 

The FSFDT  Guys turned out a brilliant wee work-around for using an Active X control with simconnect.

You can go to their main site here …. http://www.mcdu.com/index.php  (Seems to be closed now)

And the forum/download place ….  http://www.mcdu.com/forum/viewforum.php?f=47  (Seems to be closed now)

This OCX works on other languages as well.

It can extract AND input to FSX.

Using their great OCX I first made a wee program to test it (I only wanted data extracted) ,,,,

 

 

 

 

 

 

 

 

 

 

 

 

 


The source code and all the instructions are here ,,, http://www.jimspage.co.nz/link2fs_testa.zip  (Includes source code)

Tested with FSX on XP 32 bit,, Vista 32 bit and Windows 7 32 bit and 64 bit.

The FSX SDK is NOT required.

FSUIPC is NOT required.

 

VISUAL BASIC 6  RUSSEL DIRKS  METHOD. ( FSX only)

Russel turned out a source code for VB6 (Thanks Russel) and you can get it here ,,,,,

 http://www.fsdeveloper.com/wiki/index.php?title=SimConnect_-_Accessing_from_VB

Some people had trouble with this as the correct way to get it going wasn’t all that clear for a novice.

In my download there are clear instructions and a proper laid out VB6 project source code.

Its up to your own skills if you want to input into FSX with this method.

The example extracts data from FSX only using simconnect.

 

 

 

 

 

 

 

 

 

 

 


(Excuse the name ,, I always use “play” to indicate I am just “experimenting with it”.)

You can download my play with it here (Includes instructions and source code) ,,,,,

http://www.jimspage.co.nz/playruss_a.zip  (Includes source code)

Tested with FSX on XP 32 bit,, Vista 32 bit and Windows 7 32 bit and 64 bit.

The FSX SDK is NOT required.

FSUIPC is NOT required.

 

 

DELPHI  METHOD. FSX only.

Scott Hendry, Ken Adam and Jacky Brouze turned out a Delphi method of hooking into simconnect for the Delphi boys.

Scott not only knows software but is super talented in the mechanical/electrical/electronic side of simming too. Have a look around his site and your mouth will drop open.

You can find it in Scotts homepage ,,,,

 http://home.exetel.com.au/flightsim/

(I never tried this method)

 

jSimConnect - SimConnect java client library   FSX only.

Lc0277  (Lamont Clark) has a website with some great software on it,, among them is a Java/simconnect program for the Java programmers out there.

Lamont  is a very talented man ,,, some brilliant software on his website so have a look around while you are there.  Again,, your mouth will drop open.

His main page ,,,,

http://lc0277.gratisim.fr/software.html

His page on jSimConnect ,,,

http://lc0277.gratisim.fr/jsimconnect.html

(I never tried this method)

NOTE … Lamont closed his site but the great Guys at www.gratisim.fr  reposted most of it.

Had it not been for their efforts the flight sim community would have certainly lost some excellent software. Thanks Guys.

 

FS9 (FS2004) only stuff.

 

As mentioned above ,,,  FSUIPC will interface with FS9 but it’s payware.

There is a wee treasure still out there and that is Russel Dirks’s FSConnect.

FSConnect is basically just like a trimmed down version of FSUIPC as it does most of the in/out interfacing but hasn’t got the extra “Bits and pieces” that FSUIPC has ,,, but when all you want to do is extract and input data, then FSConnect fits the bill nicely.

 

At this point I would like to thank Russel for this marvelous FSConnect.DLL.  Why it’s not more widely use beats me ,,, it’s free,, interacts with FS9 & FS8 and it’s code for inclusion with a project is dead simple.

 

Russel has supplied source code samples in various languages with the download and has supplied excellent doc’s.

His website is here ,,,,  (FSConnect is down the bottom of the page.)

http://www.dirks-software.ca

 

My playing with FSConnect ,,,

Looking around my website it is obvious that I use FSX exclusively but as I produced software for various things,, I started to get badgered to do the same for FS9 as a lot of people still use FS9.  Soooo,,, I had a dabble and I was so impressed with Russel’s DLL, I included the FS9 option into my “inOut” program and it works lovely. So ,,, Yes !! my Link2fs_inOut works with FSX and FS9 !!! (Thanks to Russel and his FSConnect for the FS9 bit)

 

Anyway ,, As I like to share and help other Guys develop their own stuff ,, I had a further play and produced “Starter” programs so programmers can see how easy it is to extract / input data with flight sim.

Below are my “Jims8buttons” VB6 and VB.net versions that are designed to interact with FS9.

 

VISUAL BASIC 6  “Jim8buttons” FS9 ,,,, 

This basically shows a developer how easy it is to directly interface with FS9 with FSConnect.

It’s not much use by itself but shows a programmer how to interface  with FS9 using VB6.

I purposely used “awkward” stuff to try to cover all the different types of extractions and inputs that would commonly be used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


Read the README FIRST file re putting the file “FSConnect.dll” into FS9’s module folder.

Source code (a complete VB6 project) available here ,,,

www.jimspage.co.nz/vb6_fs9_8buttons.zip

 

 

 

VISUAL BASIC.NET  “Jims8buttons”  FS9 ,,,, 

This again basically shows a developer how to use FSConnect in a Visual Basic.Net (Express version) project.

Again it’s not much use by itself but shows a programmer how to interface  with FS9 using VB.net

I purposely used “awkward” stuff to try to cover all the different types of extractions and inputs that would commonly be used.

Please note ::: I had to change some of Russel’s code in the FSConnect.bas (FSConnect.vb) file to make this work in VB.net ,,, If it don’t work for you, then download Russel’s code and convert it yourself. It would not be appropriate to chase Russel up for any assistance with my code.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


For this project I used Visual Basic 2008 Express Edition ,, available here ,,,,  (Free)

http://www.microsoft.com/visualstudio/en-us/products/2008-editions/express

I used net framework 3.5

The project itself is a converted VB6 project so there is the normal “baggage” that goes with that within the project files.

It could be cleaned up but it runs fine like it is so I’ve never bothered.

One day I’ll get back to it and clean it up.

 

Read the README FIRST file re putting the file “FSConnect.dll” into FS9’s module folder.

 

My source code (a complete VB.net project) available here ,,,

www.jimspage.co.nz/vbnet_fs9_8buttons.zip

 

 

 

 

ACCESSING the COM. PORT in VB.NET,,,    

This has NOTHING to do with flight sim but I threw it in here as a lot of novice programmers will need something like this if they are programming for an external serial card.

When I changed to VB.net I scoured the net for com. port stuff as well. Basically I was shocked to see demo’s that were HUGE just to poke something out or get stuff in the com port.  After fiddling around and experimenting I came up with this wee program.

 

The actual “sending” is just one line ,,  the actual “receiving” is also just one line  ,,,  all the rest is to do with ensuring the port is either open or closed when it should to be and as a wee bonus ,,, it will find the ports available on your computer. You then select which port you want to open by clicking on it.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


I have this project in text format with complete instructions.  That way you learn exactly what is happening within your project.

 

You can download it here ,,,,,

www.jimspage.co.nz/serial_coms.zip

 

 

 

 

That’s it Guys ,, have fun.

This information is supplied on the basis of sharing knowledge.

As usual, I do not offer any support.

Use at your own risk.

What worked for me,, may not work for you.

If it don’t work for you,, then go and try something else.

 

 

 

Updated 11 Nov 08

Updated  16 May 2010 (32 bit and 64 bit install additions)

Flowchart: Alternate Process:  Back to the simulator main page.Updated 17 July 2011 added Link2fs_inOut stuff.

Updated 4 Dec 2011 added heaps of stuff.