If you have Desktop Connector installed, you probably realise you can ‘upload’ Revit models and other files to BIM 360 Docs by dragging and dropping to the folder in Windows Explorer (using Desktop Connector). However, when you try and link this using the BIM 360 shortcut in Revit, you might not be able to see the file…
Here is a workaround that may allow you to link a non-initiated Revit model into your Revit file:
Ensure you have Autodesk Desktop Connector installed
Start Link Revit command from the ribbon
Update: Click on the Address drop down
Click on This PC
Browse to BIM 360 from the window below:
Select the file (non initiated) that you want to link
You should get the BIM 360 prefix in Manage Links:
Here is a video of this process (with audio, This PC – BIM 360 workflow):
In the new homepage for #Revit 2019.1 when you hover over a recent project, you get the path of the central, your local, and the file size! If it’s not workshared, then you get the filepath and size. Pretty sweet.
I previously posted about how to quickly repath links based on some control mechanisms. Enter BIM 360, and the wild world of Revit cloud worksharing… I expect that it will be commonplace now for existing projects and datasets to move across to BIM360 ‘mid project’. But that creates some interesting problems, like creating folders, dealing with the initiation process, and replacing local Revit Links with their cloud versions.
This post is focused on that process of changing all of the Revit link paths to link to the BIM 360 models. Unfortunately, the previous method I used (TransmissionData, like eTransmit) is not available for cloud hosted models. So how do we automate this process?
We went about it this way:
Initiate all Revit models on the BIM 360 Document Management cloud (manually, for now)
Create one federated model on the BIM 360 cloud that links in all the other cloud hosted Revit models. You might do this one manually, using Reload From in the Manage Links dialog box.
Once you have that one ‘super host model’, use a batch process to harvest all of the cloud model data
Using the harvested data, create a script that implements a Reload From method to batch reload local models from their cloud counterpart
On the journey to solving step 3, I experimented with a few different methods. I discovered that you need to use the ExternalResource class to get information about BIM 360 cloud models (not ExternalReference).
I also realised that I had to deal with Reference Information, which appears to be a .NET dictionary per link that stores some funky Forge IDs and so on. But I want to store all this data in our VirtualBuiltApp BIM Management system, so I had to serialise the Reference Information to a string that could be stored in a database VARCHAR field (or push to Excel if you are still doing things the old way). Dimitar Venkov gave me a few tips about using JSON with IronPython in Dynamo (thanks mate!), so after that all the harvesting pieces were in place!
Here is some of the harvesting and JSON code. Notice that I played around with using a container class to pass data between Dynamo nodes. In the end, JSON string was the answer:
data = 
for u in unwraps:
container = dummy()
sdicts = 
for y in data:
dictinfo = ExternalResourceReference.GetReferenceInformation(y)
container.dictinfo = dictinfo
The next step was to create the ‘batch reload from’ tool. Now that we had the necessary data, we just had to use it to grab the matching cloud path information (from our database) and apply it to each Revit link.
I created a node that essentially built a new reference path from the JSON and other data that we had harvested. Here is some of that code:
des = 
for x in referencesInfo:
newdicts = 
for y in des:
serverGuids = 
for g in serverIdsIn:
tempguid = Guid(g)
newrefs = 
for z in range(len(referencesInfo)):
serverIdIn = serverGuids[z]
referenceInfo = newdicts[z]
versionInfo = versionsInfo[z]
sessionPathIn = sessionsPathIn[z]
tempRef = ExternalResourceReference(serverIdIn, referenceInfo, versionInfo, sessionPathIn)
OUT = newrefs
The final step was to get a RevitLinkType and a matching ReferenceInformation and apply them to each other. I stored the data in our cloud based BIM Management Application, VirtualBuiltApp. Then I could easily just pull the data into Dynamo with a suitable database connector, and match up the RevitLinkType in the current file with its associated cloud identity. For that genuine 90s feel, you could use Excel to store the data as it is just a JSON string and some other strings:
Here is the key bit of code that actually changes the link path (without all of my other error checking bits and pieces):
newCloudPath = newCloudPaths[l]
reloaded = fileToChange.LoadFrom(newCloudPath, defaultconfig)
successlist.append("Failure, not top level link or workset closed")
To actually implement the script and get productive, I opened 4 instances of Revit, and then used this process in each instance:
Open the Revit file from BIM 360, with Specify… all worksets closed
Unload all links
Open all worksets
Run the Reloader Script
Confirm link status in Manage Links
Optional: Add ‘bim 360 links loaded’ text to Start View (just for tracking purposes)
Optional: Add comment to VirtualBuiltApp (optional, for tracking purposes)
Close and Sync
In this way I can have 4 or more sessions operating concurrently, fixing all the link paths automatically, and I just need to gently monitor the process.
One nice thing is that I set the script up to immediately Unload a link after it had obtained and applied the new Path information. This means that the Revit instance does not get bogged down with many gigs of link data in memory, and in fact this is way faster than trying to use Manage Links for a similar process.
Ideally I would like to fully automate this, to the point where it opens each file, runs the script, and syncs. Unfortunately, time didn’t allow me to get all the code together for that (for now).
Finally, because we are using our custom built schema and validation tools, we can easily create visuals like this:
Modified versions of the Dynamo graphs can be found on the Bakery Github here:
Federated Central file -> Everything else (no nested links)
Next challenge: how can we quickly promote those nested links into our federated model? Well, we currently have the module files populated, so how can we leverage those positions to promote the nested links?
Promoting Nested Links
It is a bit hacky, but here is how I went about it. For each module file:
Create an empty proxy file (New Revit project, no template)
Open the Module file and resolve all link paths (so they are loaded)
Set links to Attachment
Copy / paste the link Instances from the module file (Level 0 or Base Level) into the empty file (Level 1, default level). You can use Dynamo graph above.
Save the new proxy file as ‘ModuleContainer’ or similar. We know have a file that only has link instances in it.
Open a detached copy of the Federated Central file (you can save as temporary copy if you like)
Select the current Module file,
replace with the ModuleContainer you created. Once you have done all the modules, you are ready for binding as described below.
After populating the detached Federated Central file, we just need to Bind and then Copy / Paste the free instances:
After load, Bind the ModuleContainer files to the detached Federated Central model
To do this, right-click on the file in Revit Links in Project Browser
Select All Instances – In Entire Project
In the Ribbon, click Bind Link
Untick Attached Details, Levels, Grids
Click Remove Link when prompted
Your nested links are now promoted!
Optional: Ungroup all of those bound free instances (select all from Project Browser, Ungroup in Ribbon)
Open the real Federated Central file
Copy / paste the populated free instances from the detached Federated Model to the real Federated Model. Use the Dynamo script to collect them.
Tip: Paste into a closed workset for better performance.
Close the detached one, and sync the real one
The only thing we technically ‘broke’ or lost in this process is the module link->nested link relationship. So if someone decides to move one of the nested links in the module link, obviously that won’t replicate into the Federated Central file.
Hope this helps some of you out there building or dealing with large federated models.
Collaboration for Revit 2018.3.1 Update, Dynamo Core 220.127.116.110 and Dynamo Revit 18.104.22.1680
With this install the following will be updated: Revit 2018, Collaboration for Revit 2018, and Dynamo. The updated version of the Dynamo Revit add-in does not include a desktop shortcut and can be accessed from the Visual Programming panel found on the Manage ribbon tab. If multiple versions of the Dynamo Revit add-in are installed, a dialog will prompt you to select which version to launch.
After this update is applied, there will be two versions of Dynamo Core installed, 22.214.171.1243 and 126.96.36.1990.
Known Issues with applying the update.
During the installation of the hotfix you may be prompted to exit revit.exe. If you do not have a visible session open of Revit, please open Windows Task Manger, switch to the Processes tab, click “revit.exe” and the option “End Process”.
After this update is applied, attempts to uninstall Revit 2018 using the Autodesk Uninstall Tool may become unresponsive during the Dynamo Revit uninstall process. To avoid this problem, uninstall Dynamo Revit first and then continue with the uninstall of Revit 2018.
After a new version of Revit comes out, we all take some time to catch up. Revit API developers often have to get up and running really quickly so they can upgrade their apps for Revit 2019 compatibility. The first few things you will need are: the Revit 2019 SDK and help file, RevitLookup installed, and an understanding of What’s New in the Revit 2019 API.
To install RevitLookup for Revit 2019, head over to this page and grab the latest version, currently 2019.0.0.1. Put RevitLookup.addin and RevitLookup.dll into one of your Revit Addins folders, like:
To install the Revit SDK, follow these steps:
Install Revit 2019 (or access the install media)
Look in the installation folder
In the Utilities subfolder, you will find the Revit 2019 SDK installer – RevitSDK.exe
This will basically unzip a whole heap of Revit API samples and goodness into a folder of your choosing. The key thing I look for initially is the RevitAPI.chm help file. I put this somewhere I can get to it easily (like OneDrive).
Until http://www.revitapidocs.com/ is updated for Revit 2019, the help files is the best way to access information about the Revit 2019 API.
Useful links, mostly from Jeremy over at The Builder Coder:
On install of Revit 2019, you will have the following install choices:
There are no changes in the Options dialog from Revit 2018 to 2019, except for the new Steel tab and tools ribbon option (under Structure tab and tools):
This is what the Steel ribbon looks like:
Clicking Help will take you to Help content pages that don’t exist yet (oops). I’m sure this will be rectified soon.
Build numbers are 188.8.131.525 and 20180216_1515(x64)
Launching Dynamo from Revit 2019 will reveal that the Dynamo version has been upgraded to 184.108.40.20611. As some have mentioned, this version does not run on Revit 2016. So you will have to run multiple Dynamo versions and be aware of any file incompatibility if you want to use Dynamo on Revit 2016 and Revit 2019 simultaneously. The installation process should pick up your custom package paths and any Recent Files too.
Add-ins tab reveals that the following items previously considered Subscription Enhancements are included and installed out of the box:
The biggest change you are likely to notice is that you now have Tabbed Views, and an updated interface for controlling docked panels.
I compared the built in category list from Revit 2018 and Revit 2019, and these are the new Categories in Revit 2019:
Shear Stud Tags
Mechanical Equipment Set Tags
Mechanical Equipment Set Boundary Lines
Mechanical Equipment Sets
On a final note… the Revit icon hasn’t changed for the last couple of years, so I made this Revit 2019 icon for you 🙂 Just download it and set as the icon for Revit 2019. Also, I’m sure you can do better than my attempt if you spend more than 30 seconds in Windows Paint:
Let’s say you have a family that has shape handles for instance dimensions (Length Parameters). What if you want to use it for quick prototyping, and then switch that same family into a version that uses Type based parameters?
Here’s how I went about it:
Change all existing Reference Planes to “Not a Reference”
Create new Reference Planes
Create new instance parameters bound to those Reference Planes
Lock one of the planes on each Dimension to existing origin planes
Create a corresponding set of Type dimensions
Create a set of Yes / No parameters for “Use Type for …”
Create formula like: if(Use Type for X, x type, x instance)
Apply it to the original parameters (the ones that are driving geometry):
How to Use:
Place the family
Resize using the shape handles (instance dimensions)
Create a Type
Modify the type Values and Tick the “Use Type” box
At this point, the Shape Handles are still visible, but only the Type values are used for the geometry.