Jump to content
Sign in to follow this  
ozbeowulf

Multiple XML Gauges - One CAB?

Recommended Posts

I have a working XML gauge. I want to add another gauge into the same .cab file. How do I do this and make them both work?If I take a fully functional XML file that does nothing more than display a variable and add it to the .cab file for a working gauge, the original functioning gauge stops working. It does this even though I'm not even calling the new gauge in the panel at all. Simply the presence of another XML file in the .cab breaks everything. Both XML files work perfectly independently in their own .cabs, but if I add them to the same .cab and call either or both of them, neither works.I seem to be doing this exactly the same way that all of the other gauges work (I even copy files from other working gauges and mine chokes). I found earlier that there seems to be some reserved names for gauges (like Windspeed), but is there some other fundamental naming or calling principle I'm missing here? Or does it have something to do with how I'm compressing them (I'm simply dragging the folder to cabdir.exe)?

Share this post


Link to post
Share on other sites

The saga continues. I'm certainly doing something wrong.Here's what I'm doing:1. I have a fully functional gauge working in a .cab file.2. Rename the .xml file.3. Rebuild the .cab file and verify it contains my new .xml file.4. Fix the reference in the panel.cfg to point to the new gauge in cabfile!xmlfile format.5. Reload aircraft.6. Bang head on computer because it won't work.If I rename everything back to what it was originally, it works perfect. But I'm change NO gauge code, simply rename the xml file and the cfg pointer. Does FS cache the gauges or something? I even restart FS and it still doesn't work. Grrr!UPDATE: I just restarted FS9 again, and it finally recognized the updated files. I'm using the reload aircraft command to refresh - does this not do the trick? I should also mention that FS crashes about every 3rd or 4th time that I reload a panel after changing any xml or recompressing a .cab - not sure if this is related or not.

Share this post


Link to post
Share on other sites

OK, I think I MIGHT have this straight. If you add or rename any XML file in a cab file, you must totally reload FS in order for ANY files within that CAB to be loaded, right? And reloading the plane will not suffice, right? That seems to be how it's working here.Not to be critical, but why are these basic types of things not in the SDK or any of the tutorials?

Share this post


Link to post
Share on other sites

>OK, I think I MIGHT have this straight. If you add or rename>any XML file in a cab file, you must totally reload FS in>order for ANY files within that CAB to be loaded, right? And>reloading the plane will not suffice, right? That seems to be>how it's working here.>>Not to be critical, but why are these basic types of things>not in the SDK or any of the tutorials? I don't commit XML gauges to CAB files until I've completed programming/debugging all the files I intend to put in theCAB file. Just keep everything in a FOLDER with the same name you are GOING to use for your CAB files. That way you won't have to change any references in the panel.cfg as long as you don't rename the XML files themselves. I have noted that sometimes FS9 fails to "see" some changes so I got in the habit of hitting "reload" 2 or 3 times. The M$ SDK's are sorely lacking in many areas, IMO. They often assume the reader/user has a certain level of expertise or understanding that should NOT be assued in a document that's intended as a "bible". Also, the use of "self explanatory" is, again IMO, total unsatifactory but you will find that in the M$ SDK's. Paul


Wide-5.jpg

Share this post


Link to post
Share on other sites

Hi,Most of your answers are already in topic 2 of this forum, faq 5 and 6.Also you can use the searchs function.Never "Cab" the gauges, just leave xml and bitmaps in a folder, say mygauges, and put this folder in the panel folder of your aircraft.Much easier to edit.You don't need to restart FS, but reload the panel, see faq 5 upstairs.In the panel.cfg the pointer is then:gaugexx=mygauges!xml1, a,b,cgaugexx=mygauges!xml2, d,e,fetc.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

> Just keep everything in a FOLDER with the same name > you are GOING to use for your CAB files. That way > you won't have to change any references in the > panel.cfg as long as you don't rename the XML files > themselves.I assume you mean a sub-folder in the /Gauges folder. But when I do this, FS locks the .xml files so they can't be edited. The only way to save changes to the files is to close FS, save the changes, reload FS. It's easier to just re-cab and then reload, isn't it?> Never "Cab" the gauges, just leave xml and bitmaps in a > folder, say mygauges, and put this folder in the panel > folder of your aircraft. Much easier to edit.> You don't need to restart FS, but reload the panel, see > faq 5 upstairs.Same as above. FS locks these files and I get a sharing violation, so reloading the aircraft does no good.The only way I've found to get around this is to change the panel.cfg to remove all references to the folder, reload the panel, make the xml changes, save xml, re-edit the panel.cfg to reference the folder, then reload the panel. Clicking a .bat to cab, then copy/paste, then reload aircraft is MUCH faster.

Share this post


Link to post
Share on other sites

>I assume you mean a sub-folder in the /Gauges folder. But when>I do this, FS locks the .xml files so they can't be edited.>The only way to save changes to the files is to close FS, save>the changes, reload FS. It's easier to just re-cab and then>reload, isn't it?You really need to use the Search function in this forum to find all the discussion on the topic of "Reload"... ;)In short though, the very FIRST gauge any aspiring XML gauge author should build is......the RELOAD gauge! ;)To save you the effort though, I've attached my version of the RELOAD gauge to this reply.http://forums.avsim.net/user_files/165157.jpgTo use this gauge, simply add it to the main Window00 section of your panel.cfg file:gaugeXX=Reload Gauges!Reload Gauges, 10,10,50,50After loading the a/c for the first time, click on the R button ONCE to "unlock" the XML gauge files. This will allow you to edit/save your XML gauge, return to the sim, and click on R again to instantly! see your changes......trust me, this is FAR faster than your current workflow... ;)Addendum: Sadly however, this method no longer works in FSX... :-bang


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Or, if you don't want (or have space for) another gauge, simply assign a keystroke to the RELOAD_PANELS event in the Keyboard_Main section of your FS9.cfg.Like RELOAD_PANELS=82,11assigns Cntr-Shift-R to RELOAD_PANELS(does the same / works the same as the gauge that Bill described in the previous reply).Cheers, Rob

Share this post


Link to post
Share on other sites

Yes, that IS much faster. I had it in my mind that the Reload Plane keyboard command and Reload_Panels did the same thing. I'm finally getting the hang of this! I'm building a custom panel for the Round the World Race and have now replaced about 12 other independent gauges with one gauge w/ a lot of XML files. It's nothing fancy, but I have digital displays of all sorts of vital flight information.Thanks!

Share this post


Link to post
Share on other sites

Well, I'm glad that ApolloSmith got fixed up, but I'm still fighting this reload situation. I cannot get the FS9 key command for RELOAD USER AIRCRAFT to work, although I've tried several different assignments. In addition, inserting RESET_PANELS (with key codes) in the fs9.cfg file does not work. I have assigned key commands through FSUIPC. No good. The gauge Bill posted does not work for me. I have three different FS9 installations, but I've made sure each of the .cfg files has the RESET_PANEL, xx,xx line.In every case, the reload works perhaps 5% of the time, no more. Otherwise, the cursor shows an hourglass and the panel jumps as if it is rewriting itself, but the change is not made.I'm using FSPS, but I doubt it is a factor. Manually changing a gauge line in the panel.cfg doesn't work any better.I gave up on this quirk long ago and have been using key commands to reload the aircraft (ALT, A, A, ENTER) which isn't too bad. But it sure isn't as good as it should be.And there I was, reasonably happy, when this thread started and now I'm gnashing my teeth again. :^)If anyone has any ideas, I'd appreciate hearing them.Thanks, Glenn

Share this post


Link to post
Share on other sites

"".....inserting RESET_PANELS (with key codes) in the fs9.cfg file does not work."" Because the event is RELOAD_PANELS, not RESET_PANELS :-)And if that was just a typo:- Are you sure you put it in the Keyboard_Main section (not Keyboard_Slew) ?? Or use the command when in Slew ?In fact, better place it in both sections.- Are you sure you don't have a key doubly defined now in the fs9.cfg ??I must have used this RELOAD_PANELS command thousends of time by now, and I've never seen it to fail once.Also, don't mix up RELOAD_PANELS and RELOAD USER AIRCRAFT; these events do diferent things. (I've never found the need for RELOAD USER AIRCRAFT myself; if needed, I always reload the whole flight; lasts about 2 sec. longer)Rob

Share this post


Link to post
Share on other sites

BillI've downloaded your gauge several times but my Winzip (9 SR-1) won't open it; saying it's not a valid zip file. The file length of the download is 6162 bytes.

Share this post


Link to post
Share on other sites

Here's what I found:- the .zip file posted above is corrupt.- I also could not get a keymapping for RELOAD_PANELS to work. You can map the reload aircraft in Settings... Assignments... Reload User Aircraft. I mapped it to CTL+SHIFT+;. So CTL+; will "Reset Current Flight" (at least that's the default) and CTL+SHIFT+; will reload just the plane. Neither of these is RELOAD_PANELS though.- To add a Reload_Panels gauge, add the following to your aircraft config file:gaugeXX=ReloadGauge!Reload, 10,10,10,10- Within your aircraft's panel folder (or your main /Gauges folder), create a folder named ReloadGauge and within it create a file named Reload.xml. Add the following (without the *'s) to the file:*********<Gauge Name="Panel Reload" Version="1.0"><Size X="10" Y="10"/><Element><Polygon FillColor="Red" Bright="Yes"> <Point X=" 0" Y=" 0"/> <Point X="10" Y=" 0"/> <Point X="10" Y="10"/> <Point X=" 0" Y="10"/> <Point X=" 0" Y=" 0"/></Polygon> </Element><Mouse><Tooltip>Panel Reload</Tooltip><Click> (>K:RELOAD_PANELS) </Click><Cursor Type="Hand"/></Mouse></Gauge>*********- This adds a red square to the top left of your panel. Click to reload the panels.- Clicking the gauge will instantly reload all XML. I had to reload the entire situation (CTL + ; ) to see changes in any gauge BMPs.- I am currently working on my gauges within the aircraft panel folder, so things may work differently for things in your /Gauges folder.- When you first load the plane, you must click the gauge once to unlock your XML and BMP files. Otherwise, you cannot save changes.- Using this set up, I was able to go 7 hours with FS open while editing gauges like a mad man. By using the .cab method and resetting the flight all the time, FS would crash every 3 or 4 resets.Jared

Share this post


Link to post
Share on other sites

>Bill>>I've downloaded your gauge several times but my Winzip (9>SR-1) won't open it; saying it's not a valid zip file. The>file length of the download is 6162 bytes.Rats! I mistakenly attached the ReloadGauges.CAB file instead of a zipped version of the ReloadGauges.CAB file...Here it is again, this time zipped! ;)In any case, the actual XML code is as was posted above:(>K:RELOAD_PANELS)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

>Here's what I found:>>- the .zip file posted above is corrupt.Simply renaming the file to use a .CAB extention instead of .ZIP would have worked... ;)I mistakenly uploaded the ReloadGauges.CAB file instead of a properly zipped .CAB file... Oops!


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...