From 8224e11afa866c107a48c8865079a7da546bda62 Mon Sep 17 00:00:00 2001 From: AJ Date: Fri, 27 Sep 2019 22:32:06 -0400 Subject: [PATCH] Notify user if part was not drawn as sheet metal. --- ExportDXF/Forms/MainForm.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ExportDXF/Forms/MainForm.cs b/ExportDXF/Forms/MainForm.cs index 25830e8..dda205f 100644 --- a/ExportDXF/Forms/MainForm.cs +++ b/ExportDXF/Forms/MainForm.cs @@ -378,6 +378,21 @@ namespace ExportDXF.Forms { item.FileName = Path.GetFileNameWithoutExtension(savepath); } + else + { + var desc = item.Description.ToLower(); + + if (desc.Contains("laser")) + { + Print($"Failed to export item #{item.ItemNo} but description says it is laser cut.", Color.Red); + } + else if (desc.Contains("plasma")) + { + Print($"Failed to export item #{item.ItemNo} but description says it is plasma cut.", Color.Red); + } + } + + Print(""); Application.DoEvents(); } @@ -495,7 +510,7 @@ namespace ExportDXF.Forms drawingModel.SaveAs(savePath); Print(partModel.GetTitle() + " - Saved to \"" + savePath + "\"", Color.Green); - Print(""); + drawingModel.SelectByName(0, view.Name); drawingModel.DeleteSelection(false);