//by hying 2012/1/14 判断是否有失效的方程式,并将其禁用掉 public void disableEqu(ModelDoc2 swModel) { // WriteLog("整理方程式", 1); try { EquationMgr swEquationMgr = null; swEquationMgr = ((EquationMgr)(swModel.GetEquationMgr())); int EQUnum = swEquationMgr.GetCount(); for (int i = 0; i < EQUnum; i++) { double dval = swEquationMgr.get_Value(i); if (swEquationMgr.Status == -1) { swEquationMgr.set_Suppression(i, true); //WriteLog("整理方程式成功", 1); } } } catch (Exception ex) { //swEquationMgr.set_Suppression(i, true); //Exception ex = new Exception("整理方程式失败!"); throw ex; } }