How "reload from" (reload) local file to a models in cloud (A360)

How "reload from" (reload) local file to a models in cloud (A360)

Anonymous
Not applicable
1,422 Views
6 Replies
Message 1 of 7

How "reload from" (reload) local file to a models in cloud (A360)

Anonymous
Not applicable

Part of my code looks link this:

if (path.StartsWith("RSN://revitark.nauindigo.dk/"))
					{
						using( Transaction tx = new Transaction( doc ) )
						{
							tx.Start("Reload" + linkname);
							
							res = typeLink.LoadFrom(newlocation,
							                        new WorksetConfiguration());
							tx.Commit();
						}
						
					}

This returns:

"There is not a valid Revit file at path's location\r\nParameter name: path"Error_pathtype2.PNG

  

 

 

 

 

and is seems link Reivt don't know the pathtype "Cloud, even though I use Revit 2018.2.

Autodesk.Revit.Exceptions.InvalidOperationException: The PathType of the Revit link cannot be determined (or set), because it was not loaded from a local disk drive or from Revit Server.
at Autodesk.Revit.DB.RevitLinkType.get_PathType()

 

Error_pathtype.PNG

0 Likes
1,423 Views
6 Replies
Replies (6)
Message 2 of 7

jeremytammik
Autodesk
Autodesk

Did you create the link programmatically or manually?

 

If programmatically, how?

 

Actually, in either case, how, please?



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 3 of 7

Anonymous
Not applicable

I am moving models from a Revit Server to A360 so all the links are already in my models, but I need to "Reload from" A360 in all links in all models. 

 

I have moved all models to A360. I got the path to each model from looking in "synchronize and modify settings" Revit and I  check by manually reloaded from and read the path form "Mange links" for some models.

 

Path to A360 is like: "BIM 360://NBP_Test/<models name.rvit>"

0 Likes
Message 4 of 7

jeremytammik
Autodesk
Autodesk

A lot of information and some workarounds on accessing files on A360 and BIM360 are discussed here:

 

https://forums.autodesk.com/t5/revit-api-forum/browsing-model-files-in-the-cloud-a360-c4r/m-p/779795...

 

I'll forward your specific question to the development team.

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 5 of 7

Anonymous
Not applicable

I have looked at the thread you refer to. I can now read metadata from models in the cloud. It's great, but the path is still not ok when I try to reload a model.

0 Likes
Message 6 of 7

jeremytammik
Autodesk
Autodesk

Glad to hear you made some progress. Still waiting for a response from the development team...



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes
Message 7 of 7

jeremytammik
Autodesk
Autodesk

I heard back from the development team on this. They say:

 

He'd need to use the reload functions which take an ExternalResourceReference argument, not the ones which take a path. The complicated bit here is that every provider determines their own internal structure for ExternalResourceReference, so he (she?) would need to try to figure it out by calling GetExternalResourceReference on existing A360 links.

 

Please let us know how this works out for you.

 

Thank you!

 

Cheers,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes