Ok - Progress Update:
There are 20 possible file extensions but ,rte and RTE double up.
Modified the following in uAirUtils based on the following extensions:
// Updated with new and corrected extension
// pe_route, com, efbr, fpl, flp, fmc, gfp, in, mdr, pln, rte, route, RTE
// sbr, sbp, sfp, txt, ufmc, vfp,,wx, xml
TPlanExtension = (pe_route, peCom, peEfbr, peEbr, peFpl, peFlp, peFmc,
peGfp, peIn, peMdr, pePln, peRte, peSbr, peSbp,
peSfp, peTxt, peUfmc, peVfp, peWx, peXml,
peUnknown);
// Updated with new and corrected extension
// pe_route, com, efbr, fpl, flp, fmc, gfp, in, mdr, pln, rte, route, RTE
// sbr, sbp, sfp, txt, ufmc, vfp,,wx, xml
function TPlanExtensionToStr(aPlanExtension: TPlanExtension): String;
begin
case aPlanExtension of
pe_route : Exit('');
peCom : Exit('.com');
peEfbr : Exit('.efbr');
peFpl : Exit('.fpl');
.
.
.
// Updated with new and corrected extension
// pe_route, com, efbr, fpl, flp, fmc, gfp, in, mdr, pln, rte, route,
// sbr, sbp, sfp, txt, ufmc, vfp,,wx, xml
function IsValidPlanFilename(aFilename: String): Boolean;
begin
case LowerCase(ExtractFileExt(aFilename)) of
'': if Copy(aFilename, Length(aFilename)-5, 6) = '_route' then
Exit(True)
else
Exit(False);
'.com' : Exit(True);
'.efbr' : Exit(True);
'.fpl' : Exit(True);
'.flp' : Exit(True);
'.fmc' : Exit(True);
.
.
'
Changed everything to acAivlaSoftEFB: Exit('C:\X-Plane 11\OUTPUT\FMS Plans');
Needs more work to assign the right path based on extintion and.or aircraft.
Needs more work to assign the right path based on extensions and.or aircraft.[/color][/b]
function TFlightPlan.GetDestFolder: String;
begin
// pe_route, com, efbr, fpl, flp, fmc, gfp, in, mdr, pln, rte, route, RTE
// sbr, sbp, sfp, txt, ufmc, vfp,,wx, xml
case GetExtension of
pe_route: case aircraft of
acAivlaSoftEFB: Exit('C:\X-Plane 11\OUTPUT\FMS Plans');
else Exit('');
end;
peCom: case aircraft of
acAivlaSoftEFB: Exit('C:\X-Plane 11\OUTPUT\FMS Plans');
else Exit('');
end;
peEfbr: case aircraft of
acAivlaSoftEFB: Exit('C:\X-Plane 11\OUTPUT\FMS Plans');
else Exit('');
end;
peFpl: case aircraft of
acAivlaSoftEFB: Exit('C:\X-Plane 11\OUTPUT\FMS Plans');
else Exit('');
end;
.
.
.
// Updated with new and corrected extension
// pe_route, com, efbr, fpl, flp, fmc, gfp, in, mdr, pln, rte, route, RTE
// sbr, sbp, sfp, txt, ufmc, vfp,,wx, xml
function TFlightPlan.GetExtension: TPlanExtension;
begin
case LowerCase(ExtractFileExt(downloadFilename)) of
'': if Copy(downloadFilename, Length(downloadFilename)-5, 6) = '_route' then
Exit(pe_route)
else
Exit(peUnknown);
'.com' : Exit(peCom);
'.efbr' : Exit(peEfbr);
'.fpl' : Exit(peFpl);
'.flp' : Exit(peFlp);
'.fmc' : Exit(peFmc);
'.in' : Exit(peIn);
'.mdr' : Exit(peMdr);
.
.
.
The MainForm looks good.
Maybe we need a second form to set thing like:
Current AIRAC Cycle installed.
Path where you want MasterFlightPlans Directory created.
Path to all the simulators they want installed.
Save it to an .ini or .txt file.
In X-Plane 11 we have several .ini files.