Revit 2019 - BIM360 - Unable to repath Revit Links from Cloud to Local Drive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to write a program in C# to repath the Revit Links in Revit files that have been downloaded from BIM360. The code below works just fine to reset the file path so long as the file is already linked from a local drive. However, if the Revit Link refers to a BIM360 Cloud location the LoadFrom() method returns:
"Autodesk.Revit.Eceptions.InternalException:An Internal Error has Occurred."
Is there a way to avoid this problem?
Sample code:
FilteredElementCollector colector = new FilteredElementCollector(docs);
IList<Element> linkedFiles = colector.OfCategory(BuiltInCategory.OST_RvtLinks).OfClass(typeof(RevitLinkType)).ToList();
foreach (RevitLinkType element in linkedFiles)
{
ModelPath modPath = ModelPathUtils.ConvertUserVisiblePathToModelPath(@"C:\Temp\File.RVT");
WorksetConfiguration wsConfig = new WorksetConfiguration();
(element as RevitLinkType).LoadFrom(mPath, wsConfig);
}