Jump to content
Sign in to follow this  
TheDanger

Why do FS .pln files change themselves?

Recommended Posts

I build a flightplan in FSBuild, export it to FS2004 and it looks like this[flightplan]title=EGCC to EGLLdescription=EGCC, EGLLtype=IFRroutetype=3cruising_altitude=19000departure_id=EGCC, N53* 21.14', W002* 16.30',+000257.00departure_position=05Ldestination_id=EGLL, N51* 28.39', W000* 27.41',+000083.00departure_name=MANCHESTERdestination_name=HEATHROWwaypoint.0=EGCC, A, N53* 21.14', W002* 16.30', +000000.00, etcyet somehow when I come to do the flight again it looks like this[flightplan]AppVersion=9.0.30612title=EGCC to EGLLdescription=EGCC, EGLLtype=IFRroutetype=3cruising_altitude=19000departure_id=EGCC, N53* 21.14', W002* 16.30',+000257.00departure_position=05Ldestination_id=EGLL, N51* 28.39', W000* 27.41',+000083.00departure_name=MANCHESTERdestination_name=HEATHROWwaypoint.0= , EGCC, , EGCC, A, N53* 21.14', W002* 16.30', +000000.00,etc Notice the extra commas in the waypoint fields.Any ideas what causes this as it is a pain for my app as I havent designed it to read the 2nd layout only the 1st and I cant see how it can change itself.thanksGraham

Share this post


Link to post
Share on other sites

More than just extra comments... Well, if FS9 changes the file, then obviously FSbuild does not export fully compliant files. Redesign your app. ;-)


Mike...

Share this post


Link to post
Share on other sites

But why would FS change the file? I thought it was only supposed to read the flightplan not alter it and besides it doesnt do it after each flight, sometimes I can fly the same flightplan several times then it appears to change on its own accord.

Share this post


Link to post
Share on other sites

> But why would FS change the file?The mother of all questions. Are you sure FS is doing the changing? Are you sure you're not doing it yourself through FS? If it happens this infrequently, maybe that's the case.It's hard to figure out what's going on if you can't reproduce it.Might be worth heading over to the FSbuild Forum. Maybe Ernie can shed some light on the issue. I use FSbuild as well, I'll see what happens on my end.


Mike...

Share this post


Link to post
Share on other sites

Thanks for the repliesI cant see how it can be me because only thing I do with that file is read it into my app along with fsbuild flightplan (which you have to save as .txt first). It gets loaded into ASV and RC but thats it. There shouldnt be any writing to that file at all.I'll have a look at the FSBuild forum later and see if theres any solution there.thanks againGraham

Share this post


Link to post
Share on other sites

>> But why would FS change the file?>>The mother of all questions. Are you sure FS is doing the>changing? Are you sure you're not doing it yourself through>FS? If it happens this infrequently, maybe that's the case.>>It's hard to figure out what's going on if you can't reproduce>it.>>Might be worth heading over to the FSbuild Forum. Maybe Ernie>can shed some light on the issue. I use FSbuild as well, I'll>see what happens on my end.Its that way for backwards compatibility all the way back to FS2000.The format is still supported by FS9 and FSX, so why change it and lose compatibility with earlier versions of FS ?That way FSB only need to create one file for all those FS versions.Long as it works that's all that should matter really.Regards.Ernie.


ea_avsim_sig.jpg

Share this post


Link to post
Share on other sites

Thanks but I'm not quite sure you understand my problem.In FSBuild I create a flightplan and export it to FS2004 pln format. I also save the route with fuel, weights etc into a txt fileeg EGCCEGLL.txt and EGCCEGLL.pln.These 2 files should not be written to after that by anything. I can open the .pln file and it will look like the 1st example I gave. My app is designed to read that format. It works fine and all is well.However at some point when I come back to do that flight again my app gives an error to tell me that the .pln format is incorrect or corrupted. Reopening this .pln file then displays what I am showing in the 2nd example above.So my question remains. Why would this file change? Its been created and written to by FSBuild and all FS2004 should do is read it. FSBuild involvement ends as soon I have both the .txt and .pln files. I can do several flights with this one .pln file before it gets altered by something.RegardsGraham

Share this post


Link to post
Share on other sites

I think he understands it just fine. FSbuild exports a (backwards compatible) file and FS9 can read and use the file.If FS9 then later adds some items unique to FS9 (and as a result makes it only FS9 compatible), then that's hardly Ernie's problem. The plan continues to work and that's all he's interested in. As to why FS9 does that, ask MS.As I said in my first reply, you need to redesign your app to work with both 'formats'.;-)


Mike...

Share this post


Link to post
Share on other sites

Which means then that FS9 rewrites to the file at random intervals which beggars belief. If FS9 can read that format why would it change it to a different format when all it is supposed to do is read the bloody thing!I can change my app to read both formats if required no problem but I just dont understand why I can do several flights start to finish with the one file then all of a sudden it has been changed.Doesnt matter anyway, just another annoyance of FS to get used to.Thanks,Graham

Share this post


Link to post
Share on other sites

>Which means then that FS9 rewrites to the file at random>intervals which beggars belief. I don't believe this is happening. I've never experienced nor have I heard of anyone else experiencing such a thing.I have to go with Mike's first suspicion, what writing is happeingits it being initiated by you intentionally or un-intentionally.Perhaps you are not realizing you are doing it. But FS does not randomly write .pln files. It only does it when commanded to do so.Maybe when you are reading the file, you somehow are also telling it to save the file, I don't beleieve its doing this on its own.>If FS9 can read that format>why would it change it to a different format when all it is>supposed to do is read the bloody thing!As mentioned before, its backwards compatibility.FS9 reads the format because it was the format used by FS2000, and FS2002. FSX also reads the older formats.But what it writes out is only its native FS9 format, same for FSX.FSX may read the text .pln format, but it will always save it nout in XML format.Something on your side is commanding it to save the file, and that's what it is doing.>I can change my app to read both formats if required no>problem but I just dont understand why I can do several>flights start to finish with the one file then all of a sudden>it has been changed.Whatever the problem is, I think its on your end, why that is, only you likely will be able to determine.Regards.Ernie.


ea_avsim_sig.jpg

Share this post


Link to post
Share on other sites

Thanks for replying,If its not FS9 and it definitely isnt my app writing to the file (i know this for sure cos I've written thousands of lines of code so far and it doesnt write to the .pln lol) then for me that leaves only AS6.5 or Radar Contact.I'll do some flights without these 2 running and see what happens.regardsGraham

Share this post


Link to post
Share on other sites

HelloAS6.5 has an option to convert the plan to FS9 format, is that option checked by any chance

Share this post


Link to post
Share on other sites

I ran some tests:Created a plan in FSB 2.3 and exported to FS9. The exported plan was clean.Fired up FS9 and loaded the flight. Fired up RC 4.3 and loaded the plan and started RC, got weather, clearance, etc. The plan remained clean.Fired up AS 6.5. Loaded the weather and processed (imported) the .pln file. The extra fields fields were added.Closed all.To isolate it:Fired up FSB and rebuilt it with export to FS9. As expected the plan was clean.Fired up AS 6.5 and imported and processed the .pln. As FS was not running there was no refresh nor refresh AI. The plan then had the extra fields.Closed AS and ran FSB again to export clean .pln.Started AS 6.5 and loaded weather. Plan still clean. Open AS New Route window and loaded plan without processing. Extra fields were added.Summary:Only AS 6.5 affects the .pln file as soon as you load it into the New Route dialog even without clicking the process button.

Share this post


Link to post
Share on other sites

You nailed it :)I repeated the last test with that option disabled and the file remained clean.Can AS 6.5 load other formats and then generate an FS9 plan? I do not recall if it can save its own plans, activate the weather on them, and then regenerate the file if that option is checked. In other words, I do not recall why that option exists.Thanks from all of us.

Share this post


Link to post
Share on other sites

Thanks, looks like you certainly 'nailed' it.Will disable that option for now but looks like I will have to add code to read both layouts before I release beta version later.regardsGraham

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...