Properties tab no longer responsive after running plugin

We have a plugin that runs an intense series of operations such as placing and tagging floors / rooms / areas in different views of a Revit project which runs great. However, sometimes after everything is run - Revit seems very buggy afterwards. Symptoms we’ve seen are being unable to click any elements in the any of the views (clicking an element does nothing) and also when we are able to click, the properties tab (that tells us the type and allows us to click Edit Type) does not update when we click a new element. Has anyone else seen anything similar? It is a bit difficult to reproduce but it happens frequently enough to be an annoyance.

For example, I selected the wall here but in properties, it does not update like it usually does.

Thanks in advance for any suggestions!

Hard to tell without the code.
Garbage collection issue, transaction not properly finished and commited or the script is not exiting properly.

Try and add
script.exit() by the end of your script or use a context manager for your transaction in the form:

with Revit.Trandaction('name your transaction'):
    #do stuff

This is good advice I’ll try it.

Yeah the code is actually pretty complicated and has a couple network calls / subprocessing etc in it so it’s definitely possible that any of those things could be confusing Revit. It’s just so strange that Revit gets so glitched out over running a plugin that really only places items and tags them.

Was moreso just curious if anyone had ever seen similar behavior since no one else I saw online had this issue at all ever