2024-11-09 22:59:46 +03:00
|
|
|
|
namespace RhSolutions.Tools;
|
2023-04-07 08:10:28 +03:00
|
|
|
|
|
2024-11-09 22:59:46 +03:00
|
|
|
|
internal class DxfTool : ReaderWriterTool, ITool
|
2023-04-07 08:10:28 +03:00
|
|
|
|
{
|
2024-11-09 22:59:46 +03:00
|
|
|
|
public void Execute()
|
2023-04-07 08:10:28 +03:00
|
|
|
|
{
|
|
|
|
|
Application app = RhSolutionsAddIn.Excel.Application;
|
|
|
|
|
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
|
2023-05-22 07:39:48 +03:00
|
|
|
|
_reader = _readerFactory.GetReader("Excel");
|
2023-04-07 08:10:28 +03:00
|
|
|
|
var products = _reader.ReadProducts(new[] { worksheet });
|
2023-04-17 08:49:26 +03:00
|
|
|
|
_writer = _writerFactory.GetWriter("Dxf");
|
2023-04-07 08:10:28 +03:00
|
|
|
|
_writer.WriteProducts(products);
|
|
|
|
|
}
|
|
|
|
|
}
|