![](/img/trans.png)
[英]How to find out Rackspace Cloud server info (id, IP, etc.) from within itself?
[英]How to find cloud Item id of a Revit model?
在我們的解決方案中,我們需要 Revit 模型與其在雲中的存在(BIM 360/Autodesk Construction Cloud)之間的參考。
在 Revit 中,我們打開一個雲模型或將模型保存到雲(另存為雲模型)。 rvt 文件顯然“知道”它在雲中的位置,但我看不到從文件中提取該信息的方法。 因此,挑戰是在雲中找到文件 Item id。
目前我們做了以下工作:
從 Revit 文檔我們得到
然后...
(我們不關心雲模型版本)。
這確實有效,除了第 3 步可能有點棘手。 從模型上傳到雲端需要幾分鍾,也許幾個小時,直到可以進行搜索,這很煩人。
所以這里有兩個問題:
你的方法有點復雜,我一看就看不懂。 沒有試圖達到同樣的自己。 無論如何,The Building Coder 討論了如何確定雲模型本地文件路徑並提到了一些與您類似的步驟。 也許這可以提供一些進一步的提示。 在此處搜索Revit 模型雲會發現許多其他相關主題。
使用ModelPath
方法GetModelGUID
和GetProjectGUID
。 您可以從模型“向后”並沿着樹向上移動,直到您點擊項目文件或項目頂部文件夾。 如果用戶沒有完全可見性,則特定用戶可能無法訪問父文件夾。 在GET projects/:project_id/items/:item_id/parent
下閱讀更多內容。
您使用的是哪個 Revit 版本? 如果是 Revit 2022,最新 SDK 2022 中的新 API Document.GetCloudModelUrn() 應該是您正在尋找的,並且它還提供了以下雲信息 API:
獲取模型的 Forge ID 這些方法允許您識別雲模型的 Forge ID:
Document.GetHubId(): ForgeDM hub id where the model is located
Document.GetProjectId(): ForgeDM project id where the model is located
Document.GetCloudFolderId(bool forceRefresh): ForgeDM folder id where the model is located
Document.GetCloudModelUrn(): A ForgeDM Urn identifying the model They return strings which will be empty for a document which is not a cloud model.
在https://help.autodesk.com/view/RVT/2022/ENU/?guid=Revit_API_Revit_API_Developers_Guide_Introduction_Application_and_Document_CloudFiles_html和https://www.revitapidocs.com/2022/7c2bced8-b309-b89-b309-b89-b309-b89-c320tm 上查看詳細信息
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.