Hey all
New to pyrevit but has made few tools and have been trying to deploy it to my colleagues that are not tech savy and need it served if there should be a chance of them installing the tools.
But when running the script at first i get that warning pyrevit is not a recognized cmdlet, like the CLI has not been added to the env path variable. But when I check the path C:\Program Files\pyRevit CLI\bin is in system variables.
When i run the script again everything works fine and the tools are available in Revit.
Anybody tryed this and have a solution? Seems like restarting Powershell does the trick but how does one do that mid executing and is that the right way to go.
Don’t want to muddy this discussion but I too have found sometimes that adding something to path in windows does not guarantee its availability.
Now with that being said, since the CLI is often installed under program files, you could technically call pyrevit cli using a direct path in your ps script no?
I’ve also run into this problem recently. We were previously deploying with the CLI version 4.8.8, which was working fine with everything in one ps1 script, but once we updated to a newer version of the executable it appears to silently fail on certain machines. Running two separate scripts seems like the best solution for now, but would be curious to know if anyone was able to get it working in one shot.
I was running them separately, but even this isn’t working consistently across machines. If I arrive at a better solution I’ll let you know. When running pyrevit commands directly in Powershell it works fine, but not when running the ps1 files via a BAT file. (CLI version 4.8.8 still works fine)