From 7e52f7c8182689df70b283836c4de4123c0a5597 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期二, 14 三月 2023 15:42:35 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/ConvertUtils.cs |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/ExportMap/cs/ConvertUtils.cs b/ExportMap/cs/ConvertUtils.cs
index e2ba3c0..756115d 100644
--- a/ExportMap/cs/ConvertUtils.cs
+++ b/ExportMap/cs/ConvertUtils.cs
@@ -1,5 +1,6 @@
 锘縰sing System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Web;
 
@@ -7,6 +8,34 @@
 {
     public class ConvertUtils
     {
+        /// <summary>
+        /// 宸ヤ綔閰嶇疆
+        /// </summary>
+        public static string jobConfig = "{ \"format\": \"3dtiles\", \"mode\": 0, \"outputPath\": \"{0}\", \"outputOptions\": null, \"levelOfDetail\": -1, \"levelOfDetailText\": \"Auto\", \"georeferenced\": null }";
 
+        public static string ExecNavisworks(string modelFile, string outPath)
+        {
+            try
+            {
+                string exe = @"C:\Program Files\Autodesk\Navisworks Manage 2020\Roamer.exe";
+                string cmd = string.Format("\"{0}\" -licensing AdLM -OpenFile \"{1}\" -ExecuteAddInPlugin SmartEarth \"{2}\" -NoGui -NoCache -Exit", exe, modelFile, outPath);
+
+                Process p = new Process();
+                p.StartInfo.UseShellExecute = false;
+                p.StartInfo.ErrorDialog = true;
+                p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+                p.StartInfo.RedirectStandardError = false;
+                p.StartInfo.FileName = exe;
+                p.StartInfo.Arguments = cmd;
+                p.StartInfo.CreateNoWindow = true;
+                p.Start();
+
+                return string.Empty;
+            }
+            catch(Exception ex)
+            {
+                return ex.Message;
+            }
+        }
     }
 }

--
Gitblit v1.9.3