Branding lost on OkPy script after restoring Tool Backup

While working on a tool my Revit crashed, and I wanted to restore my tool from the auto-backup (great feature btw).

However when opening the backup version of the tool the branding (also great feature!) is missing when running the script. Even though the branding is still visible in the UI preview mode, when the script is run the UI reverts back to the default OkPy colors. I prompted the agent to solve this issue but it could not find a solution, and the fact the preview shows the branding but the actual run does not tells me this is some kind of bug.

Is there a way to force refresh the branding on a script? Thanks!

Hey there @FilipeFinco !

Great to read that you’re already utilizing auto backup and branding! :grin:

The auto backup is local. This is why it won’t pick up branding. You’d have to redeploy it online and run it through the cloud for the branding to pick up again.

I prompted the agent to solve this issue but it could not find a solution

Indeed the agent uses the UI toolkit it has, and it’s the toolkit that deterministically ensures that branding gets applied for new and older tools.

Does deploying the tool to the cloud and rerunning it not bring the branding back? If so we’ll need to take a closer look at it.

After investigating a bit more I realize this seems like an issue in the editor itself not loading the branding only while OkPy editor is open. Because the UI preview loads the branding correctly but also when I simply run the script outside of the OkPy editor (just double click the script) the branding is also applied correctly.

So does not matter which script I open in the editor, the branding does not apply to the editor Run, only on the UI preview or by running the script directly.

ooooh very interesting!

thank you for reporting this. I think I have an idea where this is coming from . Thank you very much for sharing .