| | |
| | | #region 其他 |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取管网元件数 |
| | | /// </summary> |
| | | public int GetCount(eCountType countType, ref int count) |
| | | // 获取管网元件数 |
| | | |
| | | public int getcount(int countcode, ref int count) |
| | | { |
| | | if (!isWaterModelCalc) |
| | | { |
| | | return 0; |
| | | } |
| | | return HydraulicCoreBase.ENgetcount22(projectID, (int)countType, ref count); |
| | | if (!isWaterModelCalc) return 0; |
| | | return HydraulicCoreBase.ENgetcount22(projectID, countcode, ref count); |
| | | } |
| | | |
| | | // 获取错误信息 |
| | |
| | | return HydraulicCoreBase.ENgeterror22(projectID, errcode, errmsg, nchar); |
| | | } |
| | | |
| | | |
| | | public string geterrormsg() |
| | | { |
| | | if (!isWaterModelCalc) return null; |
| | | var nchar = 10000; |
| | | StringBuilder errmsg = new StringBuilder(); |
| | | //为errmsg分配内存 |
| | | errmsg.Capacity = nchar; |
| | | var err= HydraulicCoreBase.ENgetErrorMsg22(projectID, errmsg, nchar); |
| | | string str = errmsg?.ToString(); |
| | | if (string.IsNullOrEmpty(str)) return null; |
| | | var errlines = str.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); |
| | | //拼接errlines |
| | | return string.Join("\n", errlines); |
| | | |
| | | } |
| | | |
| | | // 输出文件信息 |
| | | |
| | | public int saveinpfile(string filename) |