RhSolutions-AddIn/RhSolutions.AddIn/Tools/DxfTool.cs

15 lines
459 B
C#

namespace RhSolutions.Tools;
internal class DxfTool : ReaderWriterTool, ITool
{
public void Execute()
{
Application app = RhSolutionsAddIn.Excel.Application;
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
_reader = _readerFactory.GetReader("Excel");
var products = _reader.ReadProducts(new[] { worksheet });
_writer = _writerFactory.GetWriter("Dxf");
_writer.WriteProducts(products);
}
}