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:
- Create a super federated BIM 360 model (with all other BIM 360 models linked into it)
- A Dynamo script reloads all links in order to cache them locally
- The same script interrogates, then determines the target file name and folder from VirtualBuiltApp
- 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:
- Open Revit
- Open Federated BIM 360 file (worksets closed)
- Unload all links
- 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).
- 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:
- Use known directory data along with known JSON data for the BIM 360 files (harvested previously by our proprietary systems)
- Build list of target paths
- Run copy from Dynamo to copy to target network directory
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.