我试图了解有关Revit API的更多信息,因为它可以与BIM 360一起使用。我知道我可以确定isCloudInModel
(2019 API中提供,而不是2018年 - 希望这次可以有意使用)并使用这些策略获取路径https://forums.autodesk.com/t5/revit-api-forum/determine-central-file-type-file-server-our-cloud/td-p/6506907。
BIM 360模型似乎没有订阅Sync事件,我很难理解我是否可以订阅任何与同步,保存,打开或其他任何事件有关的事件。
是否存在BIM 360上托管的模型的API和限制的参考?
通过Application / ControlledApplication类,您可以获得相应的方法。您只需要具有用于查看触发DocumentSynchronizing,DocumentSaving类型事件的应用程序是否为BIM360模型的逻辑。您可以如何找到路径。
使用Forge API,通过Data Management API,您可以使用具有此功能的PostModelJob端点:
每次将当前模型与中央模型同步时,它都会将data属性设置为null。当您将最新版本发布到BIM 360 Docs(使用PublishModel命令)时,它会将状态设置为处理或完成。
这将为您提供有关模型是否已同步的信息。您还必须使用BIM 360 Docs而不是BIM 360 Team。
Successful Retrieval of C4R Publish Status - Model Needs Publishing (200)
Note that if you have updated the central model, the data attribute is set to null until you publish it.
Request
curl -X POST -v "https://developer.api.autodesk.com/data/v1/projects/b.project.id.xyz/commands/" -H "Authorization: Bearer kEnG562yz5bhE9igXf2YTcZ2bu0z" -H "Content-Type: application/vnd.api+json" -d '
{
"jsonapi": {
"version": "1.0"
},
"data": {
"type": "commands",
"attributes": {
"extension": {
"type": "commands:autodesk.bim360:C4RModelGetPublishJob",
"version": "1.0.0"
}
},
"relationships": {
"resources": {
"data": [ { "type": "items", "id": "urn:adsk.wip:dm.file:hC6k4hndRWaeIVhIjvHu8w" } ]
}
}
}
}'
Show Less
Response
{
"data": null
"jsonapi": {
"version": "1.0"
}
}