Is there a simpler way to deploy pyRevit across a workplace?

Hi all!

I’m my firm’s BIM Manager. I have recently taken on the task of developing a custom pyRevit toolbar for my firm.

The deployment process for this is wild (for an AEC firm, in my opinion) and seems to rely on a lot of tools I don’t necessarily have access to. I don’t have admin rights to my machine, or any machines for that matter, but can deploy and run batch scripts to all of my users using KACE, our sysadmin software.

Unfortunately installing the pyRevitCLI.exe through KACE is proving to be tough for reasons unknown and I am receiving a lot of github authorization token errors and errors related to LibGit2Sharp when trying to clone repos through the CLI.

All I want to do is install pyRevit’s basic tools and then point users towards an extension folder I’ve made on a common network drive.

Is there like a configuration file I can just copy to everyone’s computer for this? I really don’t think I can deploy everything to github, as installing git for me and everyone else will be very difficult.

I am not trying to sound ungrateful when it comes to the CLI tools, I just think they are overkill for what I need.

Any advice on this would be very appreciated!

1 Like

Git is not required for regular users, only the developer for the extension. pyRevit uses LibGit2Sharp and does not require Git to be installed on system. The errors make me think you have an old version of the CLI installer.

Make sure you are using the latest version. I use the “*_admin_signed.exe”. What’s the output of pyrevit env?

Not familiar with KACE, but my company was not able to get the installation script to work using directly in Intune, so we settled on just having the Intune script call a bat file which calls the powershell installation script on each users machine. The installation files are copied to the users machine with a SyncBack profile. The installation is the same whether running the bat file directly or by installing thru Intune. Have you tried testing without KACE to confirm the issue isn’t with the script?

I was working on a installation script with easy config section in the header for adapting to your needs (choice of deployment, branch, optional extensions, check for .net framework and download/install if missing, etc). I’ll try and finish that some time this week and post after I finish testing it.

Do you directly modify the files for the extension on the network location? you don’t transfer there from a “development” folder? Hopefully you have this read only for everybody else… and keep backups. Highly recommend Git at least for development, even if you don’t use for distribution.

2 Likes

Here is the output of pyrevit env.

I can tell that I’m on an older version (4.8.14 vs 4.8.16). When I run the latest exe using KACE it doesn’t seem like it is updating. I’m not sure if that is a KACE thing or a pyRevit thing unfortunately. KACE seems to think it is executing the exe successfully so I’m not sure. I’ve also tried doing it through a Powershell script wrapped in a .bat file which plays more nicely with KACE. I can see the command being run but the pyRevit version doesn’t seem to be changing afterward.

I have a development folder I transfer from to the production folder and they are all saved on a read only drive for everyone else luckily.

download the latest “*CLI*_admin_signed.exe”

and need to see your powershell script too. The CLI installation does not install pyrevit. You still have to pyrevit clone in the powershell, and then attach to your Revit.

Did you use this guide to create your powershell script?

It’s not the intended way to deploy by any means, but we use the following:

  1. Develop your toolbar on your computer in a copy synced to github via github desktop, as a private repo only for backup purposes
  2. When ready for a ‘release’, copy the toolbar to a server accessible folder, or a company accessible private download location (we use Sharepoint)
  3. Manually or using a batch deployment tool (intune or similar), copy/replace this to a user specific folder (I use the roaming folder with a sub-folder). Have users path to that folder in pyRevit, or overwrite their pyrevit config ini file in the roaming pyRevit folder, using the wildcare for username pathing if needed (%USERNAME%)

I also recommend working in an IDE (sublime, pycharm etc.) from your github copy vs using notepad or a variant of it.

Been doing this for a while with no issues (aside from with Intune). I have also now developed a toolkit in my own toolbar that downloads and replaces the toolbar with its newer version, using a sleep counter (wait x seconds, check for condition) to force staged execution/error checking of the needed steps, then a UI just tells the user to go to settings > reload.

1 Like