| | |
| | | public class ConvertController : ApiController |
| | | { |
| | | [HttpPost] |
| | | public ResponseMsg<int> ToTileset([FromBody]ExportArgs args) |
| | | public ResponseMsg<int> ToTileset([FromBody]XYZArgs args) |
| | | { |
| | | try |
| | | { |
| | | if (null == args || null == args.ids || args.ids.Count == 0) |
| | | { |
| | | return ResponseMsg<int>.fail("请输入元数据id"); |
| | | } |
| | | |
| | | int count = ConvertUtils.Convert(args.ids); |
| | | |
| | | return ResponseMsg<int>.success("成功", 1); |
| | | return ResponseMsg<int>.success("成功", count); |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |