diff --git a/PROMS/fmtxml/FmtFileToXml.cs b/PROMS/fmtxml/FmtFileToXml.cs index cafb6a70..5266174c 100644 --- a/PROMS/fmtxml/FmtFileToXml.cs +++ b/PROMS/fmtxml/FmtFileToXml.cs @@ -422,6 +422,9 @@ public struct GeneralPrint public string SectionLevelFoldouts; public string RevDateWithForwardSlash; public string SpecialStepsFoldout; + // Added AllowDuplex to eliminate hardcoded check for WEP2 and WPB formats + // for the Disable Automatic Duplexing + public string AllowDuplex; public string AccessoryDocsInDuplex; public string FoldoutsInDuplex; public string PagelistChangeIDsWithCommas; @@ -2047,8 +2050,10 @@ namespace fmtxml } string _AlternateIndex = null; int[] rtCheckOffGroups = new int[MAXSTEPS + 1]; + private string _fmtFileName; public bool ReadInFmtFile(ref FormatData fmtdata, ref XtraFlgs XtraFlags, string fname) { + _fmtFileName = fname; int[] tmpshort3 = new int[3]; ArrayList stringoffsets = new ArrayList(); byte tmpbyte; @@ -3814,6 +3819,7 @@ namespace fmtxml else fmtdata.PrintData.PagelistChangeIDsWithCommas = "False"; if (XtraFlags.PromptForCautinType == "True") fmtdata.EditData.PromptForCautionType = "True"; else fmtdata.EditData.PromptForCautionType = "False"; + fmtdata.PrintData.AllowDuplex = _fmtFileName.StartsWith("WPB") || _fmtFileName.StartsWith("WEP2")? "True":"False"; #endregion #region Procedure if (XtraFlags.DontCapitalizeTitle == "True") fmtdata.ProcData.CapitalizeTitle = "False"; @@ -4570,6 +4576,7 @@ namespace fmtxml if (mainFmt.PrintData.RevDateWithForwardSlash != null && mainFmt.PrintData.RevDateWithForwardSlash == subFmt.PrintData.RevDateWithForwardSlash) subFmt.PrintData.RevDateWithForwardSlash = "null"; if (mainFmt.PrintData.SpecialStepsFoldout != null && mainFmt.PrintData.SpecialStepsFoldout == subFmt.PrintData.SpecialStepsFoldout) subFmt.PrintData.SpecialStepsFoldout = "null"; if (mainFmt.PrintData.AccessoryDocsInDuplex != null && mainFmt.PrintData.AccessoryDocsInDuplex == subFmt.PrintData.AccessoryDocsInDuplex) subFmt.PrintData.AccessoryDocsInDuplex = "null"; + if (mainFmt.PrintData.AllowDuplex != null && mainFmt.PrintData.AllowDuplex == subFmt.PrintData.AllowDuplex) subFmt.PrintData.AllowDuplex = "null"; if (mainFmt.PrintData.FoldoutsInDuplex != null && mainFmt.PrintData.FoldoutsInDuplex == subFmt.PrintData.FoldoutsInDuplex) subFmt.PrintData.FoldoutsInDuplex = "null"; if (mainFmt.PrintData.PagelistChangeIDsWithCommas != null && mainFmt.PrintData.PagelistChangeIDsWithCommas == subFmt.PrintData.PagelistChangeIDsWithCommas) subFmt.PrintData.PagelistChangeIDsWithCommas = "null"; diff --git a/PROMS/fmtxml/TranslateFMT.XSL b/PROMS/fmtxml/TranslateFMT.XSL index 72176f07..16969314 100644 Binary files a/PROMS/fmtxml/TranslateFMT.XSL and b/PROMS/fmtxml/TranslateFMT.XSL differ