|
@@ -71,7 +71,9 @@ namespace StartVisionSelector
|
|
|
SaveFileErrorResult(param);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ string destination = GetObjectiveFilePath(param);
|
|
|
+ //File.WriteAllText(@"d:\error.txt", destination);
|
|
|
File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, SelectorConst.RevitFileVisionFile), revitVision);
|
|
|
|
|
|
#endregion
|
|
@@ -116,7 +118,7 @@ namespace StartVisionSelector
|
|
|
while (process != null && !process.HasExited)
|
|
|
{
|
|
|
process.WaitForExit(60 * 1000); //等待执行完成
|
|
|
- if (!process.HasExited && File.Exists(path))
|
|
|
+ if (!process.HasExited) // && File.Exists(destination)
|
|
|
{
|
|
|
Thread.Sleep(5000);
|
|
|
if (process != null && !process.HasExited)
|
|
@@ -143,6 +145,26 @@ namespace StartVisionSelector
|
|
|
Environment.Exit(0);
|
|
|
//Console.ReadKey();
|
|
|
}
|
|
|
+
|
|
|
+ private static string GetObjectiveFilePath(string param)
|
|
|
+ {
|
|
|
+ Console.WriteLine(param);
|
|
|
+ string path = string.Empty;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var tempParam = param.Replace("\\\"", "\"");
|
|
|
+ JObject jObject = JObject.Parse(tempParam);
|
|
|
+ string key = @"ResultFileName";
|
|
|
+ path = jObject[key].ToString();
|
|
|
+ }
|
|
|
+ catch (Exception e)
|
|
|
+ {
|
|
|
+ Console.WriteLine(e);
|
|
|
+ }
|
|
|
+
|
|
|
+ return path;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 保存检查或导出的结果
|
|
|
/// </summary>
|