Hi, I’m new here. I’m trying to figure out how to create a command with pyrevit that can be assigned a shortcut (so to make it show up in the “ks” keyboard shortcut dialog). I thought that it will be as simple as creating:
@jpitts thanks, but it’s not showing up in the pyRevit Search netiher. Should it use the name given in the folder or do you need to specify it in the script itself? Or do you need to add a yaml or json file to it?
I thought that it may be caused due to the folder being on a network location accessed via vpn, but restarting revit didn’t help.
script.py contains only “print(“test”)” right now by the way - does it need something else to be loaded?
I agree with you that the folder hierarchy is not so user firendly, and I started a discussion between the project contributors to review that.
But you’re the first one to call it a “really stupid” idea, and I think that Ehsan, the creator of pyRevit, doesn’t deserve insults for coming up with an idea that everybody else use and profit for free, thanks to the tremendous job he did.
pyRevit scope is to quickly create the UI (tabs, panels, buttons and so on) without having to learn about the .NET boilerplate code to achieve the same result.
As I told you in the GhitHub issues (I suppose it’s you behind those enigmatic usernames ) this is not the tool you are looking for. Once again, check out RevitPythonShell for running scripts directly without worrying about UI layouts.
pyRevit is the only tool so far that let’s you assign shortcuts to scripts - from what I’ve seen you can’t do that in RevitPythonShell although there is something called “deploy RPS addin” which I’m reviewing now (docs say that it’s a “compiled” python script, which doesn’t really help neither - back to C# it is then).