简体   繁体   English

通过命令行打开 Revit BIM360 模型

[英]Open Revit BIM360 Model via command line

Has anyone successfully opened a cloud model via the command line?有没有人通过命令行成功打开云模型? I can open a non-cloud model by passing the file path, but I'm not sure how you would open something non-local.我可以通过传递文件路径来打开非云模型,但我不确定您将如何打开非本地模型。

The Revit 2020 API introduced the possibility to open a cloud model hosted in BIM360, cf. Revit 2020 API 引入了打开 BIM360 中托管的云模型的可能性,参见。 Open/Save/Modify cloud models on BIM 360 in What's New in the Revit 2020 API . 在 Revit 2020 API 的新增功能中, 在 BIM 360 上打开/保存/修改云模型

Another aspect of this new functionality is discussed by The Building Coder on the IOpenFromCloudCallback and the DefaultOpenFromCloudCallback class . The Building Coder 在IOpenFromCloudCallbackDefaultOpenFromCloudCallback类中讨论了此新功能的另一个方面。

You could use the new functionality in your own add-in implementing a handler for the ApplicationInitialized event to open a cloud model by passing in information to it either via the command line or by other means, eg, reading an input file specifying the cloud model path to open.您可以在自己的加载项中使用新功能实现ApplicationInitialized事件的处理程序,以通过命令行或其他方式将信息传递给云模型,例如读取指定云模型的输入文件来打开云模型打开的路径。

I found that if I pass path to BIM 360 project's local cache, Revit treats it like I open BIM 360 project itself:我发现如果我将路径传递给 BIM 360 项目的本地缓存,Revit 会像我打开 BIM 360 项目本身一样对待它:

# powershell

& "C:\Program Files\Autodesk\Revit 2020\Revit.exe" ^
    "C:\Users\User\AppData\Local\Autodesk\Revit\Autodesk Revit 2020\CollaborationCache\<id>\<some guid>\<another guid>.rvt

But apparently it seems to be working only if BIM 360 project had been opened at least once and therefore cache is present in given folder.但显然它似乎只有在 BIM 360 项目至少打开一次并且因此给定文件夹中存在缓存时才有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM