Sunday, May 8, 2011

[Revit] Running a local Revit Server on Windows 7 safely–free utility

Autodesk Revit Server is a product that comes bundled with Revit 2011 and 2012. It provides a way for you to better coordinate Revit access over a wide area network by hosting your central model in Revit Server and connecting your Revit to that instead of opening a .rvt file on a network drive. This is particularly useful for companies with multiple offices, as Revit Server allows you to setup a ‘central’ server and ‘local’ servers are different locations. Saves to the Local servers are done over a LAN, and the local server then synchronizes the model back to the central server in an optimized fashion. Thus providing an alternative to expensive WAN optimization devices such as those provided by Riverbed.


One usage instance that many people are interested in, is having a local Revit server instance installed on their laptop for when they work remotely. That way saves to central over a VPN are done quickly, and Revit Server will synchronize the model back to the office in the background. The problem is, Revit Server only supports Windows Server 2008 R2, which is very expensive. However there is a way around this, you can, unofficially install Revit Server on your Windows 7 computer. I’ve had success in getting this setup, and so has Dave Baldacchino from the blog Do U Revit. Check out his post on the topic and read the ‘setup’ section for instructions on how you can get it running. There is some danger in this approach, as Robert from the blog ‘Don’t think: Do Revit’ warns, that shutting the server down while it is still trying to synchronize back to the central server can cause some issues.

This is a problem, as Revit Server has no inbuilt way to tell when it is synchronizing. To solve this issue, I’ve created a small utility that sits in your system tray, and tells you when Revit Server is communicating with anyone. I call it ‘Revit Server Monitor’

image

You run the program, and minimize it to your computers tray. You will then see a green arrow to indicate that the Revit Server is not currently communicating with anyone.

image

Or if any sort of communication is in progress, you will see a red arrow.

image

So if there is a red arrow, don’t shut your computer down. Wait for a green arrow to be safe.

This works by reading port 808, which is the primary port that Revit Server uses to communicate. Using the WinPCap utility, my code can monitor traffic on this port, if it detects any, it will show the red signal. If there has been no traffic on that port for 5 seconds, the signal will turn green. You can download the tool from here. To set it up, you must first install WinPCap, which is included in the zip, and then just run the RevitServerMonitor exe (perhaps add it to your computers startup folder as well so you don’t forget to run it). The program itself requires .NET 3.5 to run, but if you have Revit installed you will have that installed as well. If you are a little worried about having software that monitors packets running on your PC, feel free to browse the source code here, it’s fairly simple!

If you are running a Revit Server on your Windows PC, do try it and let me know how it goes, I’m not guaranteeing it will prevent model corruption but I’d love to hear your feedback on how well it worked.

Download the software here.

View the source code here.

4 comments:

Jose Guia said...

Excellent work, .. what a clever way to go query the status!

Dave Baldacchino said...

Works like a charm Rod! Thanks for making it publicly available. In our case I installed it on the Local server and it reports as expected (central server also on Windows 7 SP1).

Robert said...

Hey Rod, have you tried this with Revit Server 2013? I would not expect any significant changes, but thought I would ask before kicking the tires myself.

Robert said...

Bad news, it does not seem to properly monitor Revit Server 2013 activity when you are running an Accelerator on Windows7... :-(