public static void addToModel(IPenetrTask task, PenetrInfo penInfo) { try { var penetr = new Penetration(task); penetr.AddProjection(); penetr.AddPerforation(); penetr.AddToModel(false); penetr.SetTags(); } catch (Exception ex) { ex.ShowMessageBox(); } }
public void addToModel() { previewTranCon_?.Reset(); Session.Instance.StartUndoGroup(); ElementHelper.RunByRecovertingSettings(() => { foreach (DataRow row in TaskTable.Rows) { Session.Instance.SetUndoMark(); PenetrVueTask task = rowsToTasks_[row]; try { var penetr = new Penetration(task); penetr.AddProjection(); penetr.AddPerforation(); penetr.AddToModel(false); penetr.SetTags(); row.SetField(FieldName.STATUS, "DONE"); // TODO статус о выполнении } catch (Exception ex) { // TODO статус о выполнении row.SetField(FieldName.STATUS, "ERROR"); Session.Instance.Keyin("undo"); var last = App.ActiveModelReference.GetLastValidGraphicalElement(); last?.Rewrite(); } } }); Session.Instance.EndUndoGroup(); }