diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index a7778118..5a053a74 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -3126,22 +3126,44 @@ namespace VEPROMS if (dvi != null) { DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi, true); - if (dvi.MultiUnitCount == 0) prnDlg.SelectedSlave = -1; + if (dvi.MultiUnitCount == 0) + { + prnDlg.SelectedSlave = -1; + } + else if (dvi.MultiUnitCount > 0) + { + string[] arguments = Environment.GetCommandLineArgs(); + for (int i = 0; i < arguments.Length; i++) + { + if (arguments[i].Contains("/C=")) + { + Console.WriteLine("In arguments loop"); + //int num; + string[] childarg = arguments[i].Split('='); + if (int.TryParse(childarg[1], out int num)) + { + prnDlg.SelectedSlave = num; + } + } + } + + } prnDlg.AllowDateTimePrefixSuffix = false; //C2018-033 don't append any selected date/time pdf file prefix or suffix (defined in working draft properties) prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window //prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed); //while (!_RunNext) Application.DoEvents(); - } - } + } + + } ranAuto = true; } - } - } - if (ranAuto) - { - this.Close(); + if (ranAuto) + { + this.Close(); + } + } } }