Image in Forms.alert

Hi, I started to make some forms.alert in startup.py file in my pyrevit extension.

I could’nt find if there is a way to include an image (static of gif) inside a simple form (like a logo for example)

Is it possible in any way ?

Thank you

pretty sure it is doable with the proper xaml template outside of this pre-built function.

Not answering your question…
But one note, using a forms.alert uppon startup forbid any other process to go past it if you don’t auto exit it or the user does not click ok or exit.
I did just that and also did that with a hook at file_opening time. It was a bad idea as some of my colleagues had automation going one and did not have any way to dismiss the window.
What I did instead, was to use a regular output window (there you can embed anything as it accepts html)

Noted, thank for this feedback, I will look around the output window for inserting image but now I have to learn how to control its appearance (and learn a little bit of html maybe ?)

Do you know if pyrevit.forms.toaster locks revit process also ? it seems not…

pyrevit.forms.toaster.send_toast(message, title=None, appid=None, icon=None, click=None, actions=None)

I doubt it

yeah, it depends what you are trying to achieve, but sky is the limit with html…

So here I am now, exploring html startup windows with output function.

I loaded this script in startup.py :

# -*- coding: UTF-8 -*-
from pyrevit import forms
from pyrevit import script

output = script.get_output()

output.set_title('flash info')
output.open_page(r'C:\Users\XXXX\Documents\index.html')

But it seems that the output windows open and close itself too quickly.
I would like it to stay for the user to clic on .

Which function could I call to make it stay visible ?

Thank you

I have a colleague working in Revit 2020 that told me that he saw my startup window and it stay visible for him…

But for me even after deactivating all other extensions or addins, I see the output window opening and closing automatically in all version from revit 2021 to 2024…

Weird story …

You may have another hook active that uses the close_others() method on output windows maybe?
I would start renaming the hook folder if you have one.

Hi Jean-Marc,
I wasn’t precise enough in last message but I tried to only load an empty extension with just this startup script, so no hook at all … and it closes

I will try on other computers just to be sure, moreover, if you think that this script must work

Thank you

The output window only stay visible on reload extension, and not at the real revit startup