From 4760444d7276aec024dac5fbbc202becc41105dd Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 30 Dec 2018 18:33:30 +0200 Subject: Machine designer working with spools ! PMR of dispenser & spools changed. --- .../Tango.Integration/Operation/MachineOperator.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs') diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index aa5f93b11..868a87d97 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -1213,6 +1213,18 @@ namespace Tango.Integration.Operation ticket.Spool = new JobSpool(); job.SpoolType.MapPrimitivesTo(ticket.Spool); + + var spool = job.Machine.Spools.SingleOrDefault(x => x.SpoolType == job.SpoolType); + + if (spool == null) + { + throw new InvalidOperationException("Job spool type is not registered with this machine."); + } + else + { + spool.MapPrimitivesTo(ticket.Spool); + } + ticket.Spool.JobSpoolType = (JobSpoolType)job.SpoolType.Code; ProcessParameters process = new ProcessParameters(); -- cgit v1.3.1