Problem getting cloud path from files in BIM360

Problem getting cloud path from files in BIM360

edfdiloreto
Contributor Contributor
3,041 Views
36 Replies
Message 1 of 37

Problem getting cloud path from files in BIM360

edfdiloreto
Contributor
Contributor

I'm using Revit 2022 API and this method to get the cloud path: 

 

ModelPathUtils.ConvertCloudGUIDsToCloudPath("US", "projectGuid", "modelGuid")

 

This is working well with files that were collaborated by my team via Revit. The problem is with the files that are consumed through design collaboration (package consumption in BIM360). I'm getting this error:

Exception: You are unauthorized to access this hub/project or the hub/project doesn't exist. Detail is Haven't found the cloud model.
Please check if your cloud folder is accessible and if the model exists or not.

 

What could be the error? This process works manually...

 

Thanks!

0 Likes
3,042 Views
36 Replies
Replies (36)
Message 2 of 37

jeremy_tammik
Alumni
Alumni

Good question. I asked the development team for you.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 37

edfdiloreto
Contributor
Contributor

Thanks @jeremy_tammik !

 

We just recently found out which is the problem. The person who run the plugin needs to have admin rights in BIM 360 in order to get the cloud path to the file. This is big problem because we are working in a big project and the plugin will be used for a lot of people, and the Project admin will have to give admin permissions to each one of them.

 

How could we do it without having to give permissions to each person?

0 Likes
Message 4 of 37

jeremy_tammik
Alumni
Alumni

Yes, that all makes perfect sense. I passed on this additional info to the devteam, asking for advice on how to handle it.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 5 of 37

Messi_Hu
Autodesk
Autodesk

Does that person who run plug-in have permission to access that model ( I mean not the full permission of Admin, just need to access that project and model (folder))?

RCM Service will refuse the operations if that person have no permission to access it even that user get the cloud path because RCM service need check user token and permission from A360 .

Message 6 of 37

edfdiloreto
Contributor
Contributor
Yes, the person who runs the plug-in has access to that model. For example, that person can manually relink that model to the cloud sucessfully.
Message 7 of 37

Messi_Hu
Autodesk
Autodesk

Thanks for your quick reply. Link need different permission, can that person open that model directly?

Can you upload the journal file so that we can ping it quickly?

Message 8 of 37

edfdiloreto
Contributor
Contributor
Since the model was consumed from a package in BIM 360, that person can't open it directly.

I'm not sure which is the journal file. You mean the consumed model?
Message 9 of 37

Messi_Hu
Autodesk
Autodesk

Thanks for your reporting.

I understand it now, for link and open, we designed 2 kinds of permissions for it. Your problem is the user cannot convert to-linked model as cloud path. 

I need bring this issue to team and discuss it with our PO.

Message 10 of 37

edfdiloreto
Contributor
Contributor
Thanks for your predisposition!
0 Likes
Message 11 of 37

Messi_Hu
Autodesk
Autodesk

Append a question, what is the general permission settings for that user who want to link the model on that project/folder?

 

Message 12 of 37

edfdiloreto
Contributor
Contributor

This could be a typical setting in BIM360 for a person trying to run the plugin.

 

Permissions.png

 

Message 13 of 37

Messi_Hu
Autodesk
Autodesk

No, I mean the permission on folders where the model locates in.

118360_0-1660620353379.png

 

Message 14 of 37

edfdiloreto
Contributor
Contributor
Sorry for the delay. The user has full control in the folder.
Message 15 of 37

Messi_Hu
Autodesk
Autodesk

That make me confuse, user has full permission for that folder, but he/she could not open model?

0 Likes
Message 16 of 37

edfdiloreto
Contributor
Contributor

The models are coming from a package to consume. We can only link that models to our own models (we cannot open or modify them). Since we have a lot of models to link, doing it manually takes a lot of time. Right now, we wrote a plugin to do it automatically. In that process we need to get the cloud path to that file in order to load the link inside the model, and this is when we have the error. We can only get that path if user that runs the plugin has admin rights in BIM360.

0 Likes
Message 17 of 37

edfdiloreto
Contributor
Contributor

Just to be more clear, this is the folder:
folder 1.pngfolder 2.png

0 Likes
Message 18 of 37

Messi_Hu
Autodesk
Autodesk

Thanks for your clarification, then I know the reason. Revit API current doesn't support this way. The reason is for consum model, it is not a real RCM model, it is a snapshot of RCM model specific version. 

For your case, even though you generate the path successfully, I feel it would link to latest version of RCM model, rather than the specific version in consume folder.

 

0 Likes
Message 19 of 37

edfdiloreto
Contributor
Contributor

I understand. Like I said before, we have no problems linking the file using Admin permissions in BIM360. The problem is when a non-admin user tries to use the plugin. There is a solution or workaround that we could use without giving admin permissions to all the users?  

0 Likes
Message 20 of 37

edfdiloreto
Contributor
Contributor

We couldn't generate the path successfully when the user is not admin. There is when we have an exception. We are using this method and this the one that causes the Exception ("RevitServerUnauthorizedException"):

 

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

0 Likes