using ExportMap.cs;
|
using ExportMap.Models;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Net;
|
using System.Net.Http;
|
using System.Web.Http;
|
|
namespace ExportMap.Controllers
|
{
|
public class ConvertController : ApiController
|
{
|
[HttpPost]
|
public ResponseMsg<int> ToTileset([FromBody]ExportArgs args)
|
{
|
try
|
{
|
|
|
return ResponseMsg<int>.success("成功", 1);
|
}
|
catch (Exception ex)
|
{
|
LogOut.Error(ex.StackTrace);
|
return ResponseMsg<int>.fail(ex.Message);
|
}
|
}
|
|
[HttpGet]
|
public ResponseMsg<string> Test()
|
{
|
string modelFile = @"E:\soft\Navisworks Manage 2020\Data\jz.rvt";
|
string outPath = @"D:\xyz\3dtiles\out";
|
|
string rs = ConvertUtils.ExecNavisworks(modelFile, outPath);
|
if (string.IsNullOrEmpty(rs))
|
{
|
return ResponseMsg<string>.success("成功", "");
|
}
|
else
|
{
|
return ResponseMsg<string>.fail(rs);
|
}
|
}
|
}
|
}
|