Automated BIM360 Docs On Premises Backup Using CollaborationCache and Dynamo

I have developed a working BIM360 to on-premises backup mechanism. There were a few different ways to go…

 

I initially considered:

  • Hacking Windows Explorer to touch the files in the BIM 360 node and try and trigger the BIM360 Docs download and copy to local PC or network location
  • Developing a Forge app that essentially pulls the desired models out of the BIM 360 cloud to desired location?

In the end, I decided to use the Revit API (Dynamo and Python), along with VirtualBuiltApp, to essentially reverse engineer a folder structure from the local CollaborationCache folder. These ideas are hinted at here.

 

In simple terms, the BIM 360 Docs on-premises backup workflow is:

  1. Create a super federated BIM 360 model (with all other BIM 360 models linked into it)
  2. A Dynamo script reloads all links in order to cache them locally
  3. The same script interrogates, then determines the target file name and folder from VirtualBuiltApp
  4. Dynamo then copies the files into their ‘backup’ location on the local network

 

Some more detail is presented below:

 

A) Cache Cleaner CMD Script (may not really be necessary, as the ‘reload’ should overwrite superseded cache anyway):

Kill Revit if Open… be careful of below steps, particularly if Revit has crashed recently. You might need these local copies 🙂

cd "%LOCALAPPDATA%\Autodesk\Revit\Autodesk Revit 2018"
cd CollaborationCache
rmdir oldCache
mkdir oldCache
for /d %i in (*) do move "%~i" oldCache

 

B) Manual steps to setup Revit model environment to run the script:

  1. Open Revit
  2. Open Federated BIM 360 file (worksets closed)
  3. Unload all links
  4. Open all Worksets

 

C) Dynamo Script:
Run Dynamo (Python) script that reloads and unloads all links (this collects .rvt into cache). Key Python commands to use are: RevitLinkType.Load() and RevitLinkType.Unload(None).

Potential Problems:

  • Coordination Monitor alert, no longer exists
  • Instance of link needs Coordination Review
  • “Some numerical data within the imported file was out of range. This numerical data has been truncated.”
  • “Geometry in the file … has extents greater than 20 miles (33km).”

Local cached Models appear into

%LOCALAPPDATA%\Autodesk\Revit\Autodesk Revit 2018\mainCacheFolder\hostModelIdFolder\LinkedModels\*.rvt

 

D) Dynamo Script continues to:
Rename and copy to desired target location. How do we determine this?

Using proprietary VirtualBuiltApp schema:

  1. Use known directory data along with known JSON data for the BIM 360 files (harvested previously by our proprietary systems)
  2. Build list of target paths
  3. Run copy from Dynamo to copy to target network directory

Part of the script:

 

Note: you can actually browse some BIM 360 Docs data in a .sqlite3 file located in path shown below. You can use DB Browser for SQLite as a viewer.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments