Wednesday, June 22, 2016

RevitPythonShell for Revit 2017

I have just released a version of RPS for Revit 2017. It is labeled as a “Pre-Release”, since I have not really had time to test it, but you are all welcome to give it a spin and tell me about any problems you find.

Better yet: Send me pull requests with fixes to your problems!


  1. Hello,

    I've recently migrated from Revit 2015 to 2017, and updated the RPS version as well. Here is the problem I encounter: when running my old scripts, some functions aren't up to date anymore, and I would like to debug it, but there is no information in the error message on where is the problem. Exemple: I just get a message such as "None has no AsDouble attribute".. but I don't know in which function, which line, etc. Is it linked to the new version of RPS ?
    Thanks a lot,

  2. Actually, while I'm at it.. I encounter another problem with a call to uidoc.ShowElements()
    Indeed, I used to do that to prompt the user to select some walls, it worked fine with 2015 version. Now, it still works, but the Python Shell window stays in the foreground and therefore prevents the user to select anything on the screen. I don't remember if I did anything special in my 2015 version so that the window would automatically go background to allow the user to select walls, but now the window stays in the foreground.
    Furthermore, I found some old posts of mine asking on how to deal with such things, and I got some answers using commands such as __window__.Hide(), Show(), etc.. The problem now with that is that when I use "__window__" not directly in the main shell command, but through an import in another function, it says that "__window__" is not defined.. why is that ?
    Thanks for any help!

    1. Ok I can just pass __window__ as an argument..