How to find cloud Item id of a Revit model?

dxh8678 注册会员
2023-01-26 11:49

Use the ModelPath methods GetModelGUID and GetProjectGUID. You can go 'backward' from the model and go up the tree until you hit the Project File or the project Top Folder. If the user does not have full visibility, the parent folder may not be accessible to a specific user. Read more under GET projects/:id/items/:item_id/parent.

bobo08030409 注册会员
2023-01-26 11:48

Which Revit version are you using? If Revit 2022, the new API Document.GetCloudModelUrn() in latest SDK 2022 should be the one you are looking for, and it also provides the following API for cloud info:

Getting the Forge ID for a Model These methods allow you to identify the Forge IDs for Cloud Models:

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.

Check details at https://help.autodesk.com/view/RVT/2022/ENU/?guid=Revit_API_Revit_API_Developers_Guide_Introduction_Application_and_Document_CloudFiles_html and https://www.revitapidocs.com/2022/7c2bced8-b309-b67f-2b82-13299c617a0b.htm

dongshengye77 注册会员
2023-01-26 11:48

Your approach is a bit too complex for me to grasp at a glance. without having tried to achieve the same myself. Anyway, The Building Coder discussed how to Determine Cloud Model Local File Path and mentions some similar steps to yours. Maybe that can provide some further hints. Searching here for Revit model cloud turns up numerous other related threads.

About the Author

Question Info

Publish Time
2023-01-26 11:48
Update Time
2023-01-26 11:48