Sign in to follow this  
taguilo

New XML Gauge Help

Recommended Posts

Greetings,I am attempting to make a new XML Carb Heat gauge for my Cessna 140 panel for FS2002. It looks correct, but does not work. Is there someone who I could send the gauge and two bitmaps in a ZIP so they could fix it? Thank you.Best regards,Gary Norton

Share this post


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

Ok, how about this. Is there anyone who would make me a gauge? Thank you.Gary N

Share this post


Link to post
Share on other sites

Gary,Maybe you can post the code you got so far and proly you will get an answer/solution to you problem/question.Douglas

Share this post


Link to post
Share on other sites

This is what I tried:- - - - - ImageSizes="39,61"/>- ImageSizes="39,61"/>- (A:Eng Anti Ice:1,percent)> - - - Use in FS2002 with two bmp. The first is transparent, the second shows the knob in an open position. I admit, I know very, very little about XML, some about C++. Thank you for any help. Gary N

Share this post


Link to post
Share on other sites

The first thing I notice is there's no argument for (4th line down). You need a test in order for your to know what the value is. Since in your example code has only 2 values( 0 and 1 ) I assume that the variable you want to test is a boolean.(L:This Variable Is On, bool)If true, will be 1, and GSN_C140_CH_ON.BMP will display, else GSN_C140_CH_OFF.BMP will display.Second, looks like some syntax errors in your tags.WRONG:ImageSizes="39,61"/>RIGHT:I assume this is for 2002, since the ImageSizes declaration is in there, otherwise you can remove those as well.Good luck,--Jon

Share this post


Link to post
Share on other sites

might work but not tested. some things were changed a bit (A:General eng anti ice position:1,percent) // line changed Carb HeatDouglas

Share this post


Link to post
Share on other sites

Opps, yes, I missed seeing the below the . I guess I generally put it above since it seems more intuitive to me that way. Anyway, if it's still not working I'll be happy to test it out.--Jon

Share this post


Link to post
Share on other sites

>Opps, yes, I missed seeing the below the . I>guess I generally put it above since it seems more>intuitive to me that way. Anyway, if it's still not working>I'll be happy to test it out.>>--Jon>Opps, yes, I missed seeing the below the . I>guess I generally put it above since it seems more>intuitive to me that way. Anyway, if it's still not working>I'll be happy to test it out.>>--JonHi,.. Condition Structure won't work. It is always Condition and only then conditionals are evaluated. What command does is remove the last stack entry and bring it available for the command(s) to use in the evaluation. In summary, something that should work using Jon's first example is:A:General eng anti ice position:1,bool) A:General eng anti ice position:1,bool)Carb HeatHope this helpsTom

Share this post


Link to post
Share on other sites

I apologize for my lack of knowledge regarding XML, but I really wish to make gauges for my panel. Ok, I now have an XML gauge. I placed it in the gauge file along with the two bmp images. And, of course it still does not work. Please tell me how to make this all work. Thank you.Gary N

Share this post


Link to post
Share on other sites

Hi,Show your code again.(If you use the code from upstairs it won't work, it is wrong)If the entry in the panel.cfg, gaugexx=.. etc. is ok and the xml file with the 2 bitmaps are in the proper directory, can also be in the panel section of your aircraft, then the gauge should work.Beware, if you safe the code in a text file it also won't work.You may try this one first:(A:General eng anti ice position:1,bool)( was missing!Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Gary,I am also now learning to make gauges and at first the going is slow so I know the feeling. Below are pic of panel I'm working on. Maybe some of the more experienced guys will shed some light but in the meantime, here goes.I'm not sure what you mean by "placed it in the gauge file"Lets say your gauge is well coded meaning no errors (or it will not show up or in some cases it shows up but does nothing, frozen) you can place it in any file folder you like but it must be correctly referenced in your panel folder in order for FS to locate it.Simple Path:C:FS2004 /Gauges /My Panel(Could be any name you like) |-carbHeat.xml |-bitmap1.bmp |-bitmap2.bmpLets assume that your gauge is going to occupythe gauge25 line In the snip of the panel file belowgauge21=737-400!Gear Lever, 964,457,51,152gauge22=737-400!Nose Gear Light, 977, 402, 28, 22gauge23=737-400!Left Gear Light, 964, 424 ,28 ,22gauge24=737-400!Right Gear Light, 992, 424 ,28 ,22gauge25=My Panel!carbheat, your gauge coordinates hereIf all else fails, post your code here to see if all's well.Douglas B-707 Ret.http://forums.avsim.net/user_files/144442.jpghttp://forums.avsim.net/user_files/144443.jpg

Share this post


Link to post
Share on other sites

<?xml version="1.0" encoding="UTF-8"?>A:General eng anti ice position:1,bool) A:General eng anti ice position:1,bool)Carb HeatDo I understand that I should place the XML and BMPs in the aircraft's panel folder, rather than the MSFS Gauge folder? Also, into which line should I place the missing instruction, A:General eng anti ice position:1,bool? I am confused, because it appears in the code above. Also, you say "Beware, if you save the code in a text file it also won't work." How should I save it?Thank you.Gary N

Share this post


Link to post
Share on other sites

I understand the x,y numbers, but what is the significance of the additional two sets of numbers? For example, gauge21...,51,152.gauge21=737-400!Gear Lever, 964,457,51,152gauge22=737-400!Nose Gear Light, 977, 402, 28, 22gauge23=737-400!Left Gear Light, 964, 424 ,28 ,22gauge24=737-400!Right Gear Light, 992, 424 ,28 ,22gauge25=My Panel!carbheat, your gauge coordinates hereThank you.Gary N

Share this post


Link to post
Share on other sites

Gary,The numbers tell fs the xANDy the other two numbers sets the size of the gauge, some panels just use the parent or original size of the gauge itself in other words if you install a gauge and find it either too large or too small you can then size it to suit your needs by changing the last two numbers ( one draws height and the other length. As for the bitmaps placement: like I said you can put them any where you like as long as the xml file they belong to are in the same folder.So, try making a folder, for the exercise call it carbheat, now your fs directory should look like this,,J:Program FilesMicrosoft Games Flight Simulator 9 Gauges carbheat |GSN_C140_CH_OFF.BMP |GSN_C140_CH_ON.BMP |carbheat.xmlPanel.cfggaugeXX=carbheat!carbheat, (cordinates) XX will be the next number in your panel cfg so if you panel has up to gauge25 the next number will be gauge26 and so on. HERE IS THE XML WITH CHANGES.<?xml version="1.0" encoding="UTF-8"?>(A:GENERAL ENG1 ANTI ICE POSITION,bool)(A:GENERAL ENG1 ANTI ICE POSITION,bool)Carb HeatDouglas

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