| | |
| | | } |
| | | } |
| | | |
| | | [HttpGet] |
| | | [HttpGet] // http://localhost/ExportMap/TB/Wait?seconds=10 |
| | | public ResponseMsg<string> Wait(long seconds) |
| | | { |
| | | try |
| | |
| | | if (isBusy) throw new Exception("已有一个生成Mpt的任务正在执行"); |
| | | |
| | | isBusy = true; |
| | | string js = "E:/terrait/TianJin/ExportMap/ExportMap/TerraBuilder/tb.js"; |
| | | File.Copy("E:/terrait/TianJin/ExportMap/ExportMap/TerraBuilder/tb.tbp", "E:/terrait/TianJin/ExportMap/ExportMap/TerraBuilder/tb01.tbp", true); |
| | | string js = Path.Combine(SourcesPath, "tb.js"); |
| | | |
| | | string newTbp = Path.Combine(Tools.TempDir, time, time + ".tbp"); |
| | | File.Copy(Path.Combine(SourcesPath, "tb.tbp"), Path.Combine(SourcesPath, "tb01.tbp"), true); |
| | | |
| | | //string cmd = string.Format("\"C:/Program Files/Skyline/TerraBuilder/TerraBuilder.exe\" -script \"{0}\"", js); // -DisablePrint |
| | | ReloadTB(); |
| | |
| | | err = Tools.ExecExe("\"C:/Program Files/Skyline/TerraBuilder/TerraBuilder.exe\"", string.Format("-script \"{0}\"", js), false); |
| | | isBusy = false; |
| | | |
| | | return File.Exists("D:/LF/data/mpt/tb.mpt"); |
| | | return File.Exists(MptPath); |
| | | } |
| | | catch (Exception ex) |
| | | { |