获取文件转换的二维图纸信息_文档_BIMFACE_BIM应用二次开发平台

API:获取文件转换的二维图纸信息

GET https://api.bimface.com/data/v2/files/{fileId}/drawingsheets

获取文件转换后跟该三维模型相关联的二维图纸信息列表,目前只支持revit。


请求(Request)

Header
key value 示例
Authorization bearer {accessToken} bearer xxxx-xxxx-xxxx-xxxx
Content-Type application/json
Url Parameter
字段 类型 必填 描述 示例
fileId Number Y 文件Id 924547689389024
Request Body

curl -X GET
-H "Authorization: bearer <your accessToken>"
-H "Content-Type: application/json"
"https://api.bimface.com/data/v2/files/<your fileId>/drawingsheets"

响应(Response)

HTTP STATUS

200

成功返回
{
  "code": "success",
  "message": null,
  "data": [
    {
      "portsAndViews": null,
      "viewInfo": {
        "cropBox": [
          -30480,
          -30480,
          -304800,
          30480,
          30480,
          -30.480000000000004
        ],
        "elevation": 0,
        "id": "382617",
        "levelId": "",
        "name": "A102 - Plans",
        "outline": [
          2.4999999998688107,
          -1.0000000000133762,
          842.4999999998686,
          592.9999999999862
        ],
        "preview": {
          "height": 724,
          "path": "m.bimface.com/e766f8bb69915a822b009e0fee6f2280/resource/thumbnails/382617/382617.png",
          "width": 1024
        },
        "thumbnails": [
          "m.bimface.com/e766f8bb69915a822b009e0fee6f2280/resource/thumbnails/382617/382617.96x96.png"
        ],
        "viewPoint": {
          "origin": [
            0,
            0,
            0
          ],
          "rightDirection": [
            1,
            0,
            0
          ],
          "scale": 1,
          "upDirection": [
            0,
            1,
            0
          ],
          "viewDirection": [
            0,
            0,
            1
          ]
        },
        "viewType": "DrawingSheet"
      }
    },
    {
      "portsAndViews": null,
      "viewInfo": {
        "cropBox": [
          -30480,
          -30480,
          -304800,
          30480,
          30480,
          -30.480000000000004
        ],
        "elevation": 0,
        "id": "503701",
        "levelId": "",
        "name": "A104 - Elev./Sec./Det.",
        "outline": [
          2.4999999998688107,
          -1.0000000000133762,
          842.4999999998686,
          592.9999999999862
        ],
        "preview": {
          "height": 724,
          "path": "m.bimface.com/e766f8bb69915a822b009e0fee6f2280/resource/thumbnails/503701/503701.png",
          "width": 1024
        },
        "thumbnails": [
          "m.bimface.com/e766f8bb69915a822b009e0fee6f2280/resource/thumbnails/503701/503701.96x96.png"
        ],
        "viewPoint": {
          "origin": [
            0,
            0,
            0
          ],
          "rightDirection": [
            1,
            0,
            0
          ],
          "scale": 1,
          "upDirection": [
            0,
            1,
            0
          ],
          "viewDirection": [
            0,
            0,
            1
          ]
        },
        "viewType": "DrawingSheet"
      }
    }
  ]
}
字段 类型 描述 示例
viewInfo.id String 图纸ID 503701
viewInfo.name String 图纸名称 A104 - Elev./Sec./Det.
viewInfo.levelId String 楼层ID 12
viewInfo.preview Object 图纸的预览图片地址信息
viewInfo.thumbnails Array 图纸的缩略图地址信息
viewInfo.viewPoint Object 图纸在三维模型中的视点信息, 对DrawSheeting类型不适用
viewInfo.viewType String 图纸的类型,这里始终返回“DrawingSheet”, 在revit中,类型还有“View” DrawingSheet
viewInfo.elevation Float 图纸所在的标高, 对DrawSheeting类型不适用
viewInfo.outline Object 图纸在世界坐标系下的包围盒
viewInfo.cropBox Object 图纸的裁剪区域,对DrawSheeting类型不适用
portsAndViews Object 图纸包含视口与视图
失败返回
{
    "code": "authentication.failed",
    "message": "Token was not recognized."
}
错误码
code 说明
system.error BIMFace系统异常
authentication.failed API访问合法性校验失败
file.not.found 文件不存在