fatcharlie Posted November 26, 2009 Report Share Posted November 26, 2009 Hello to anyone who's successfully gotten offset info using Visual Basic 2008 Express. Help! I have no idea what I'm doing... well, to be exact, only the sketchiest idea of what I'm doing. I have written a little prog in VB8 which runs a verbal checklist for a Boeing 738. Basically it uses short .wav files to issues the challenges from the checklist, than asseses the state of the item called. If it's in the required state, the prog plays the .wav file for the appropriate response. If not, the prog waits 5 seconds and re-issues the challenge. At the moment, I have no interface to FS9 - the 'appropriate state' is simulated by a checkbox within VB8. i.e. when the prog plays the challenge, I check the checkbox and it responds properly. I can play around with things and the prog still reacts properly - eg. I can go through the checklist items and 'check' random items. the prog will give the response for items which are checked, but wait at the items not checked. The logic of the prog is working as I want, but now I need to be able to use the FSUPC interface for VB.Net to extract the data. My logical programming is OK - I grew up with the original BASIC programming language, so I have a general grasp of that, but I don't really know how to get VB8 to talk to FS9. What I've done so far: 1) downloaded the FSUIPC SDK 2) opened the UIPC_SDK VB .Net Shell Revision 2.004.zip and run the .sln 3) Carried out the upgrade asked-for by VB8 4) where VB8 was giving an error message for the Public Const items, because they did not have an 'As' entry, I have added 'As Object' 5) ran the debug on this Amazingly, it sems to work. I added a second form and asked the prog to open it on loading Form 1. I also added a couple of message boxes ("fsuipc found" and "fsuipc not found, application will exit"). The second form opens and if FS9 is running, I get the "fsuipc found" message, if not I get the ""not found" message. Yay! So after all that, how do I get , say, the value of the offset for the battery switch (281C)? I understand I have to use the FSUIPC_Get function, but I have no idea of the syntax required. What i want to do is: If Battery Switch = 1 then 'or, whatever value represents the "on" state play response.wav endif Sorry for long post, but I felt the need to fill you in on the background - I hope it all makes sense. Cheers, Roger. Link to comment Share on other sites More sharing options...
fatcharlie Posted November 27, 2009 Author Report Share Posted November 27, 2009 OK, I have realised that the FSUIPC Client DLL for DotNet needs to be included. I have also realised I have to include the Imports FSUIPC line in my prog. I'm now struggling with getting the FSUIPCConnection.Open() command to work - I'll let you know how it goes! Anybody out there? :-) Roger. Link to comment Share on other sites More sharing options...
Pete Dowson Posted November 27, 2009 Report Share Posted November 27, 2009 OK, I have realised that the FSUIPC Client DLL for DotNet needs to be included.... Anybody out there? If you are using Paul Henty's client DLL then you'll find he does give excellent support for his work, but you might need to post on his thread, or at least refer to the "Client DLL for .NET" in your subject title. Paul's main thread is "sticky" (i.e. stays near the top of the Forum), here: viewtopic.php?f=54&t=53255 Regards Pete Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now