Sign in to follow this  
S Foster

PMDG 737 Airstairs gauge

Recommended Posts

Hi,Could someone please help me with the following, I have only just started looking at XML gauges and to be honest know nothing yet, although I have managed to make a couple of gauges purely by looking at how other peoples ones were made.What I would like to be able to do is create a pushbutton which will extend the PMDG 737 airstairs the first time it is clicked, and on the second click retract them.I understand how to make a gauge that will work to open doors for example but the problem I have with the PMDG 737 is that it uses two different commands one to extend the airstairs and another to retract them.To extend the airstairs it uses the "Extend Concorde Nose & Visor Fully" and to retract the airstairs it uses the "Retract Concorde Nose & Visor Fully"How would I create a gauge that can do this? If anyone can help I would be extremely grateful and if you can would you please post the code I need and keep the explanation simple as I really am a total novice.Regards,Steve.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,Try:(A:CONCORDE VISOR POSITION PERCENT,percent) 1 < if{ (>K:INCREASE_CONCORDE_NOSE_VISOR_FULLY) } els{ (>K:DECREASE_CONCORDE_NOSE_VISOR_FULLY) } Hope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,Thank you for your help, unfortunately this is just far to complicated for me and I haven't got a clue as to how to do it. I was going to try and change the code in the gauge I use for opening and closing the doors (below) - which I freely admit is not mine and I hope it's OK to use someone elses idea, but I don't know what bit goes where and when I try and use FS Panel studio to create it I just get errors. (A:EXIT OPEN,percent) 0 > 2 * (G:Var1) +(M:Event) 'LeftSingle' scmp 0 == if{ (>K:TOGGLE_AIRCRAFT_EXIT) (>K:SELECT_0) 1 (>G:Var1) } (M:Event) 'LeftRelease' scmp 0 == if{ 0 (>G:Var1) }Open/Close passenger door

Share this post


Link to post
Share on other sites

OK,1. Make a Bitmap 40 x 40 pixels and call it: Airstairs.2. Make the xml-gauge as below and give it the name Airstairs.3. Put bitmap and xml files together in a new folder under the panel folder of your aircraft.(aircraftpanelnew folder)4. Add a new line in your panel.cfg: gaugexx=new folder!Airstairs, x, y, w, h(xx= next free gauge numberx= x-position on the panely= y ...w= widthh= height)xml text:Air stairs(A:CONCORDE VISOR POSITION PERCENT,percent) 1 < if{ (>K:INCREASE_CONCORDE_NOSE_VISOR_FULLY) } els{ (>K:DECREASE_CONCORDE_NOSE_VISOR_FULLY) }Hope it works,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,I'm really sorry, but I still can't get it to work. I did exactly as you said and all that ends up in the xml file is:Air stairs(A:CONCORDE VISOR POSITION PERCENT,percent) 1 It seems to be missing out half of the lines, even though I did a "cut & paste" straight from your last answer.I really appreciate your help but it just seems like it's not meant to be.Steve.

Share this post


Link to post
Share on other sites

Hi,Do you edit in Notepad?If not, it is the easiest way!You can open the xml file with notepad, edit and save.No need to "cab".If cut and paste did't work, just type the showed code.Your code does't do anything.Give the bitmap some color so you can see if it is showing up.Later you can make a proper bitmap.The lines:(A:CONCORDE VISOR POSITION PERCENT,percent) 1 < if{ (>K:INCREASE_CONCORDE_NOSE_VISOR_FULLY) } els{ (>K:DECREASE_CONCORDE_NOSE_VISOR_FULLY) }are imperative.It means: if Visor position is less than 1 percent, then deploy fully.If not, close.Back to the drawing board!Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,Thank you for trying, I have done exactly as you have said in your postings, but it still doesn't work. I opened up the panel.cfg in FS Panel Studio and I can see the gauge in that but it doesn't show up in FS2004.This is what I have done:1) Opened notepad and cut and pasted the the following text into it.Air stairs(A:CONCORDE VISOR POSITION PERCENT,percent) 1< if{ (>K:INCREASE_CONCORDE_NOSE_VISOR_FULLY) } els{(>K:DECREASE_CONCORDE_NOSE_VISOR_FULLY) }Saved the file and then renamed it to: airstairs.xml2) Created a folder called airstairs in my Flight Simulator 9AircraftPMDG737-800panel folder so that I get Flight Simulator 9AircraftPMDG737-800panelairstairs3) In the airstairs folder in the panel folder, it has the following 2 files: airstairs.xml (created as in 1 above) and airstairs.bmp4) In my panel.cfg file I have the following linegauge20=airstairs!airstairs, 737, 519, 44, 20As far as I can tell I have done everything as you suggested, unless of course i've made a stupid mistake that I haven't seen. I have also tried putting the airstairs folder in the gauges folder just in case it wasn't looking in the right place but this made no difference either.I'm now totally confused why this wont work, but I can see it in FS Panel Studio but not in FS2004!If you have any ideas I would be very grateful.Regards,Steve.

Share this post


Link to post
Share on other sites

Steve,You can double click the xml file in the file explorer and see if it opens internet explorer and see if you get any error messages.Second you need to reload the aircraft in flightsim to show the change. There is a reload gauge that could do that or you just select another plane and reselect your plane again and make sure you have saved your changes in the fs panel studio before reloadingBrgdsEugen

Share this post


Link to post
Share on other sites

Hi,1. You could try the gauge in another aircraft with moving elements reacting on this command like the new posky 767-300, apu door.(I use it and it works)2.Or in a default aitrcraft just to see if the gauge shows up (colored bitmap)3. May be the PMDG doesn't allow changes??Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Hi Eugen,I have done as you suggested and double clicked the file in explorer and it came up with the following:The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. ---------------------------------------------------------------------Whitespace is not allowed at this location. Error processing resource 'file:///C:/Program Files/Microsoft Games/Flight Simu...< if{ (>K:INCREASE_CONCORDE_NOSE_VISOR_FULLY) } els{-^------Is this any help? I don't know what "whitespace" is, but I guess I shouldn't have any going by what it says.Regards,Steve.

Share this post


Link to post
Share on other sites

Hi,Strange, probably cause you're working with that program.I use only MSPaint and Notepad for my panel.And again, the gauge I wrote is working.Did you unpack the xml files?If no, I suggest you do.Then take one xml file and edit with Notepad:Erase all text and paste the airstairs code and save.Now you have an altered xml file and name it airstairs and put it in the folder under panel together with the bitmap.No need to pack again!!Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Jan,Have done as you have suggested, restricted my use to only MSPaint and Notepad.I unpacked the XML file from the CAB file, deleted all the text in it using Notepad as the editor, cut and pasted the text you supplied me with, saved it as Airstairs.xml.I then put that xml file along with a bmp of the same name in the aircrafts pael folder as you said and added a line to the panel cfg file, but still it wont work.Can you e-mail me the working version that you have and I can try that one, my e-mail address is SteveATspfoster.com just replace the AT with @Many thanks.Steve.

Share this post


Link to post
Share on other sites

Here ya go :)tested it and it worls fine,All i did was replace the first lowerthan for the text syntaxand it worked fine CheersWozza

Share this post


Link to post
Share on other sites

Wozza,Thanks for that, downloaded your file and it works perfectly. Jan also kindly sent me an e-mail on what he has been doing, so now I have it working fine.Next step will be to make the bitmap change colour when the airstairs are extended and go back to the orignal colour when they are retracted. Nothing like a challenge for someone who knows nothing about this.Many thanks,Steve

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this