|
@@ -5,6 +5,8 @@ using System.IO;
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
using SAGA.DotNetUtils.Extend;
|
|
|
using SAGA.DotNetUtils.Logger;
|
|
|
+using System.Configuration;
|
|
|
+using System.Diagnostics;
|
|
|
|
|
|
//using RevitToJBim.Common;
|
|
|
|
|
@@ -53,7 +55,7 @@ namespace ExportStart
|
|
|
//path = @"testdata\龙岗万达2020.12.10\LG-WDGC-B02-ALL.rvt";
|
|
|
//path = @"testdata\龙岗万达2020.12.10\LGWDGC-F01-ALL.rvt";
|
|
|
//path = @"testdata\龙岗万达2020.12.10\LG-WDGC-F03-ALL.rvt";
|
|
|
- path = @"testdata\龙岗万达2020.12.10\LG-WDGC-F04-ALL.rvt";
|
|
|
+ path = @"E:\Develop\RevitProject\RevitPro\ServiceRevit-wanda\OutputDll\testdata\龙岗万达2020.12.10\LG-WDGC-F04-ALL.rvt";
|
|
|
//path = @"testdata\龙岗万达2020.12.10\LG-WDGC-F06-ALL.rvt";
|
|
|
//path = @"testdata\龙岗万达2020.12.10\LGWDGC-Q-B01-ALL.rvt";
|
|
|
//path = @"testdata\龙岗万达2020.12.10\LGWDGC-Q-F02-ALL.rvt";
|
|
@@ -109,8 +111,10 @@ namespace ExportStart
|
|
|
SaveResult(param, result);
|
|
|
Console.WriteLine("Task EndTime:" + DateTime.Now);
|
|
|
RevitCoreContext.Instance.Stop();
|
|
|
+
|
|
|
+ StartRevitSimplify(path);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//强制退出
|
|
|
Environment.Exit(0);
|
|
|
}
|
|
@@ -141,6 +145,25 @@ namespace ExportStart
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ static void StartRevitSimplify(string filePath)
|
|
|
+ {
|
|
|
+ var filename = Path.GetFileNameWithoutExtension(filePath);
|
|
|
+ var project = ConfigurationManager.AppSettings["Project"];
|
|
|
+
|
|
|
+ Console.WriteLine(DateTime.Now + " 准备执行轻量化:");
|
|
|
+ string fullPath = ConfigurationManager.AppSettings["RevitSimplifyPath"];
|
|
|
+ Process process = new Process();
|
|
|
+ process.StartInfo.FileName = fullPath;//执行的exe路径
|
|
|
+ process.StartInfo.WorkingDirectory = Path.GetDirectoryName(fullPath);
|
|
|
+ process.StartInfo.UseShellExecute = true;
|
|
|
+ process.StartInfo.CreateNoWindow = false;
|
|
|
+ //process.StartInfo.RedirectStandardInput = true;//打开流输入
|
|
|
+ //process.StartInfo.RedirectStandardOutput = true;//打开流输出
|
|
|
+ //process.StartInfo.RedirectStandardError = true;//打开错误流
|
|
|
+ process.StartInfo.Arguments = $" InputFile={filePath} OutputDir={project}/{filename}";
|
|
|
+ process.Start();//执行
|
|
|
+ process.WaitForExit();
|
|
|
+ }
|
|
|
enum CommandType
|
|
|
{
|
|
|
None = 0,
|