【已更新最新开发文章,点击查看详细】
在《C#开发BIMFACE系列31 服务端API之模型对比2:获取模型对比状态》中介绍了根据对比ID,获取一笔记录的对比状态。由于模型对比是在BIMFACE云端进行的,通常需要5~10分钟,在等待对比的过程中还可以发起更多的模型对比,最后通过接口一次性批量获取模型对比状态 。
该功能与BIMFACE控制台中“图模对比”功能相同。
请求地址:POST https://api.bimface.com/compares
说明:应用发起对比以后,可以根据筛选条件,通过该接口批量查询对比状态
参数:
其中 ModelCompareQueryRequest 类如下
1 /// <summary> 2 /// 批量获取模型对比状态的请求参数类 3 /// </summary> 4 public class ModelCompareQueryRequest 5 { 6 /// <summary> 7 /// 【必填项】应用的 appKey 8 /// </summary> 9 [JsonProperty("appKey")] 10 public string AppKey { get; set; } 11 12 /// <summary> 13 /// 【非必填项】对比后返回的ID,用于获取对比状态或者结果等信息 14 /// </summary> 15 [JsonProperty("compareId", NullValueHandling = NullValueHandling.Ignore)] 16 public long? CompareId { get; set; } 17 18 /// <summary> 19 /// 【非必填项】模型对比的类型 rvt(或者igms…) 20 /// </summary> 21 [JsonProperty("type", NullValueHandling = NullValueHandling.Ignore)] 22 public string Type { get; set; } 23 24 /// <summary> 25 /// 【非必填项】文件名称 26 /// </summary> 27 [JsonProperty("fileName", NullValueHandling = NullValueHandling.Ignore)] 28 public string FileName { get; set; } 29 30 /// <summary> 31 /// 【非必填项】模型对应的sourceId。例如:389c28de59ee62e66a7d87ec12692a76 32 /// </summary> 33 [JsonProperty("sourceId", NullValueHandling = NullValueHandling.Ignore)] 34 public string SourceId { get; set; } 35 36 /// <summary> 37 /// 【非必填项】(分页)当前页码 38 /// </summary> 39 [JsonProperty("pageNo", NullValueHandling = NullValueHandling.Ignore)] 40 public int? PageNo { get; set; } 41 42 /// <summary> 43 /// 【非必填项】(分页)每页记录数 44 /// </summary> 45 [JsonProperty("pageSize", NullValueHandling = NullValueHandling.Ignore)] 46 public int? PageSize { get; set; } 47 48 /// <summary> 49 /// 【非必填项】模型状态码。0(所有) 1(处理中) 99(成功) -1(失败) 50 /// </summary> 51 [JsonProperty("status", NullValueHandling = NullValueHandling.Ignore)] 52 public short? Status { get; set; } 53 54 /// <summary> 55 /// 【非必填项】筛选类型。例如:create_time desc 56 /// </summary> 57 [JsonProperty("sortType", NullValueHandling = NullValueHandling.Ignore)] 58 public string SortType { get; set; } 59 60 /// <summary> 61 /// 【非必填项】对比开始时间,格式:yyyy-MM-dd hh:mm:ss 62 /// </summary> 63 [JsonProperty("startDate", NullValueHandling = NullValueHandling.Ignore)] 64 public string StartDate { get; set; } 65 66 /// <summary> 67 /// 【非必填项】对比结束时间,格式:yyyy-MM-dd hh:mm:ss 68 /// </summary> 69 [JsonProperty("endDate", NullValueHandling = NullValueHandling.Ignore)] 70 public string EndDate { get; set; } 71 }