public void Import() { string command = @"CRU-IMPORT"; try { reinitialize(); MSExcel.Clear(); clear(); MSExcel.Import(@"settings.xls", Settings.MSExcel.FORMAT.HEAP); flash(); } catch (System.Exception e) { Logging.AcEditorWriteException(e, command); Logging.ExceptionCaller(MethodBase.GetCurrentMethod(), e); } Logging.DebugCaller(MethodBase.GetCurrentMethod(), string.Format(@"Выполнена команда: {0}", command)); }
public void Go() { string command = @"GO"; Logging.DebugCaller(MethodBase.GetCurrentMethod(), string.Format(@"Выполняется команда: {0} - перенаправление CRU-IMPORT", command)); try { // !!! 2013 Application.DocumentManager.MdiActiveDocument.SendStringToExecute(@"CRU-IMPORT ", true, false, true); // ??? 2014 //Application.DocumentManager.MdiActiveDocument.Editor.Command(new object[] { @"CRU-IMPORT" }); } catch (AutoCAD.Runtime.Exception e) { Logging.AcEditorWriteException(e, command); Logging.ExceptionCaller(MethodBase.GetCurrentMethod(), e); } catch (System.Exception e) { Logging.AcEditorWriteException(e, command); Logging.ExceptionCaller(MethodBase.GetCurrentMethod(), e); } }