Monday, December 5, 2016

Update to "Embedding a webserver in Autodesk Revit with the RevitPythonShell"

As discussed on the RevitPythonShell forum, previous examples of using ExternalEvent don’t work anymore with Revit 2017.

Turns out, the fix was really easy: You just need to implement the IExternalEventHandler.GetName method. I have placed a comment explaining this very briefly on the page that introduces embedding a webserver in Autodesk Revit with the RevitPythonShell. The source for the updated RpsHttpServer is, of course, on GitHub: rpshttpserver.py

Thanks to Callum for finding the bug and @PMoureu for providing the solution :)

2 comments:

  1. Can you please comment the few lines of code where the changes need to be made. Thanks and cheers for a great blog.

    ReplyDelete
  2. Hello Unknown. All you need to do is implement GetName. Like this:


    def GetName(self):
    return 'RpsHttpServer'

    ReplyDelete