Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Opening a cloud model with Revit API

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
ivo.lafeber
1799 Views, 7 Replies

Opening a cloud model with Revit API

I Have a piece of program in which I open a cloud model, I have 2 projects on the https://docs.b360.autodesk.com server, they open like a charme

A new project which we are starting is on https://docs.b360.eu.autodesk.com  (europe) server.  when I use the same software I get an error code 5 - the central model is missing. 

 

Does anybody recognize this problem ?

 

 

Try
Dim mpcloud As ModelPath = ModelPathUtils.ConvertCloudGUIDsToCloudPath(ProjectGUID, ModelGUID)
Dim DOfcc As New DefaultOpenFromCloudCallback
ActiveUIDoc = app.OpenAndActivateDocument(mpcloud, oo, False, DOfcc)
ActiveDoc = ActiveUIDoc.Document
Catch
LogForm.AddLog("Could not open cloud model. " & Err.Number & " - " & Err.Description)
Err.Clear()
End Try

7 REPLIES 7
Message 2 of 8
jeremy_tammik
in reply to: ivo.lafeber

Maybe you need to update your Revit version.

 

The current Revit API includes a region parameter in the call to ConvertCloudGUIDsToCloudPath:

  

https://www.revitapidocs.com/2022/aa710231-4cab-98ba-951f-00c72e06bb6e.htm

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 8
ivo.lafeber
in reply to: jeremy_tammik

Jeremy,

 

Thanks for pointing me in the right direction.

Message 4 of 8

Hi Jeremy
I think I've covered a lot of the links and topics on the forum but there is one question that remains unanswered for me:

To open a file that is on accdocs, we can use the method: ConvertCloudGUIDsToCloudPath ok, (you wrote it the new functionnlyty here, https://thebuildingcoder.typepad.com/blog/2018/04/whats-new-in-the-revit-2019-api.html#4.1.5) a but how to retrieve the Guid of a file that has never been opened yet (so, not being in the CollaborationCache folder)?
Like other files wich are located in my network, I want to open documents wich are une the cloud...

 

With VisualStudio, I've added the Autodesk Forge reference.

Do I have to get a Token Key in order to Open Revit files wich are in the accdocs of my client?

Hope I'm clear...

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
Message 5 of 8

Dear Pierre, I asked the devteam for you.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 6 of 8

Based on the competent answer you received in the other thread on a Problem getting cloud path from files in BIM360, I cancelled the query to the devtam again:

  

https://forums.autodesk.com/t5/revit-api-forum/problem-getting-cloud-path-from-files-in-bim360/m-p/1...

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 7 of 8

Dear Jeremy

I was afraid of not having an answer so I published my question in two topics. Thank you for answering me.

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
Message 8 of 8

Dear Pierre, 

  

Thank you very much for moving the ACC Docs related part of the question to StackOverflow:

  

https://stackoverflow.com/questions/75530623/open-files-located-in-the-accdocs

  

Eason Kang very kindly answered it there and provided a complete explanation of how to use APS to retrieve the region, projectGuid and modelGuid data required to populate the arguments to ConvertCloudGUIDsToCloudPath.

   

Best regards,

  

Jeremy

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


Autodesk Design & Make Report