Whenever we deploy an Autodesk update, for example in this case a Revit 2024 and Autodesk Identity Manager update, pyRevit seems to cause issues where users are unable to sync models and relinquish ownership of elements. We’ve removed the pyRevit add-in from Revit 2024 and it’s resolved the issue.
Has anyone experienced something similar or has any idea what could cause this?
Yes, we also never had issues before. It might have to do with our company CLI based installer, inspired by pyRevit for Teams instructions.
We can possibly fix it by switching to the .EXE based installer and running post config with two CLI commands (additional extension lookup source and config).
Do you see anything odd in below script?
# pyRevit deploy root path
$pyrevitroot = "C:\ProgramData\pyRevit"
# the name of the clone we are going to create
$ourclonename = clone-base-admin"
# dependencies folder
$dependenciesroot = $(Join-Path $PSScriptRoot "\msi")
function Install-PyRevitCLI() {
# SCCM will handle this
# Write-Output "Installing .Net (4.8)..."
# Start-Process -FilePath $(Join-Path $dependenciesroot "\ndp48-web.exe") `
# -ArgumentList "/q /norestart" `
# -Wait `
# -Verb RunAs > $null
# uninstalling old pyRevit CLI
# Write-Output "Uninstalling previous pyRevit CLI..."
# Uninstall-Package -Name "pyRevit CLI"
# Get-Package -Name pyRevit CLI -RequiredVersion 4.8.10.22040 | Uninstall-Package
# install/update pyRevit CLI
Write-Output "Installing pyRevit CLI..."
# Start-Process -FilePath $(Join-Path $dependenciesroot "\pyRevit_CLI_4.8.12.22247_admin_signed.exe") `
Start-Process -FilePath $(Join-Path $dependenciesroot "\pyRevit_CLI_4.8.15.24089_admin_signed.exe") `
-Wait `
-ArgumentList "/SILENT /exenoui /qn" > $null
# -ArgumentList "/NORESTART /VERYSILENT /exenoui /qn" > $null
}
# clone pyRevit
function Clone-PyRevit() {
# make sure paths exits and are clean
Confirm-Path $pyrevitroot
# close all open Revits first
# Write-Output "Closing All Revits..."
# pyrevit revits killall
# attempt to cleanup registry and remove the left over keys from previous installs
pyrevit doctor purge-installs
# forget all previous pyRevit clones if any
# Write-Output "Forgetting and deleting previous installs..."
# pyrevit clones forget $ourclonename > $null
# pyrevit clones delete base
# # Delete folder of previous installation
# Write-Output "Removing older folders..."
# Remove-Item $pyrevitcoredest
# clone pyRevit now
Write-Output "Cloning Core..."
pyrevit clone $ourclonename base --dest=$pyrevitroot
Configure-PyRevit
Write-Output "Registering clone with name..." $ourclonename
# pyrevit clones add clone-base-admin "C:\Users\Guus.Gooskens\AppData\Local\pyRevit"
pyrevit clones add $ourclonename $pyrevitroot
Attach-PyRevit
}
#configure pyrevit
function Configure-PyRevit() {
# make necessary config changes
Write-Output "Configuring pyRevit..."
# Option 1, less stable than configuring from file and less options:
# pyrevit configs logs none
# pyrevit configs checkupdates disable
# pyrevit configs autoupdate disable
# pyrevit configs rocketmode enable
# pyrevit configs filelogging disable
# pyrevit configs loadbeta disable
# this final step is critical
# this seeds the config file for all the future users
# pyrevit configs seed
# option 2, config from ini file
pyrevit config --from "\\global\systems\Software\PyRevit Config\pyRevit_config.ini"
}
#attach pyrevit to create pyRevit.addin manifest files
function Attach-PyRevit() {
Write-Output "Attaching pyRevit to Installed Revits..."
pyrevit attach $ourclonename 2711 --installed --allusers
}
# test whether a command exists in the environment
# Example: Test-CommandExists "pyrevit"
function Test-CommandExists {
param ($command)
$oldPreference = $ErrorActionPreference
$ErrorActionPreference = 'stop'
try {
if(Get-Command $command){
return $true
}
}
catch {
return $false
}
finally {
$ErrorActionPreference=$oldPreference
}
}
# confirms target path exists and is empty. removes existing if found
function Confirm-Path ([string] $targetpath) {
Write-Output "Confirming $($targetpath)"
If (Test-Path $targetpath) {
Remove-Item -Path $targetpath -Recurse -Force
}
New-Item -ItemType Directory -Force -Path $targetpath > $null
}
function Set-Extension-Lookup-Source () {
Write-Output "Setting extension source path..."
pyrevit extensions sources add "\\global\systems\Software\PyRevit Config\extensions.json"
}
# env path for PyRevit CLI
$env:Path = "C:\Program Files\pyRevit CLI"
$env:Path = "C:\Program Files\pyRevit CLI\bin"
Install-PyRevitCLI
# orchestrate the installation
if (Test-CommandExists "pyrevit") {
Clone-PyRevit
Set-Extension-Lookup-Source
}
# Read-Host -Prompt "Press Enter to exit"