Thursday, April 16, 2015

How to Get the Worksharing Status of a Revit File (Central, Local, or Not Workshared) Using DymamoBIM

If you want to get the worksharing status all you do is simply open up the .rvt file using DynamoBIM's powerful string reading tools and follow the steps below


1. Open DynamoBIM
2. add a file path node and select any Revit PROJECT (.rvt) file
3. add a file.frompath and file.readtext node
4. add a String.Split node and add the following string as shown in the image below
5. extract the second entry in the list as shown.

Confused? dont be. Its easy. DynamoBIM is essentially opening up the .rtv file in notepad and reading the text and isolating the part that starts with "Worksharing" and ends with "User" It is written with spaces in the .rvt file so that is why there are \0 between each letter in the code block because "\0" designates a space.

Good luck.
Note that if your Revit file (.rvt) file is really large then it may take a while for DynamoBIM to read all that text... so be patient!

1 comment:

Tim and Lindsay said...

This is the classic so close, so far.
Its fantastic, yes. Its just that the holy grail to my revitadmin is that the users not draw on the wrong workset. If activeworset <> currentview.discipline then change background color.