OKpy - Close UI After Run

Is there a method or state i should use to close the user interface after the run button is clicked? At the moment it always seems to stay open in the background and if the users doesn’t notice this they can end up with multiple versions of the UI open.

I have tired “window.Close()” but I’m getting window is not defined error.

Thanks
Jonny

Im testing version 1.8.0 today, but the UI not closing unless you manually hit the “X” was the same in v1.7…

1 Like

Verry good question @jonny89 ! no way to do that so far, but we should definitely implement a toggle in the editor mode that lets you tick “close after run”. You can except to see this implemented.

Hello Mostafa,

Following each run, the OKpy UI window consistently retreats behind the main Revit window. While manually closing the window might not pose a significant inconvenience, it would be preferable if the window remained in the forefront of the main Revit screen. Its unexpected behavior of disappearing behind might mislead users into assuming the OKpy window is closed when, in fact, it remains open.

I love the idea of implementing a toggle feature, enabling the window to auto-close upon each run or stay open based on user preference, which we could set on the backend. However, even with such a toggle in place, it remains crucial that if the window stays open, it consistently remains at the forefront of the user interface.

I hope this clarifies my perspective. Let me know if you need further clarification or information

1 Like

Yes this makes a lot of sense. I’ve personnaly been strugling with this too recently!

Thankfully, where releasing version 1.8.3 with some more fixes and this will be included (the window staying open, not the “close after run” toggle)

1 Like