From 56a32cd56774440e2a01f181224a5a16c8212b08 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Fri, 7 Apr 2023 08:10:28 +0300 Subject: [PATCH] Add DxfTool --- RhSolutions.AddIn/Tools/DxfTool.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 RhSolutions.AddIn/Tools/DxfTool.cs diff --git a/RhSolutions.AddIn/Tools/DxfTool.cs b/RhSolutions.AddIn/Tools/DxfTool.cs new file mode 100644 index 0000000..291a2e1 --- /dev/null +++ b/RhSolutions.AddIn/Tools/DxfTool.cs @@ -0,0 +1,19 @@ +#if !NET472 +using System.Runtime.Versioning; +#endif + +namespace RhSolutions.Tools; + +#if !NET472 +[SupportedOSPlatform("windows")] +#endif +internal class DxfTool : ToolBase +{ + public override void Execute() + { + Application app = RhSolutionsAddIn.Excel.Application; + Worksheet worksheet = app.ActiveWorkbook.ActiveSheet; + var products = _reader.ReadProducts(new[] { worksheet }); + _writer.WriteProducts(products); + } +}