aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-30 18:33:30 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-30 18:33:30 +0200
commit4760444d7276aec024dac5fbbc202becc41105dd (patch)
tree5993065e325350e782415c07c41bda25f504d854 /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
parent78895e61c773c785dd8d8e3ed4f17236cdcefcd0 (diff)
downloadTango-4760444d7276aec024dac5fbbc202becc41105dd.tar.gz
Tango-4760444d7276aec024dac5fbbc202becc41105dd.zip
Machine designer working with spools !
PMR of dispenser & spools changed.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs12
1 files changed, 12 insertions, 0 deletions
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();