Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using the status prompt in Revit

Message 1 of 6
2156 Views, 5 Replies

Using the status prompt in Revit

Does anybody know if (and how) it is possible to use the status prompt for your own custom messages ?


When you let your user select some elements, you can use the statusprompt easely like so :


IList<Element> PickSelection= sel.PickElementsByRectangle("Select by rectangle my highly appreciated user");


But what if I want to use the status prompt for telling the user a certain action has ended. What I am trying to avoid is an anoying message box to inform the user an action has ended.


Is there soemthing like StatusPrompt.Show("Action completed"); ?



Message 2 of 6
in reply to: Anonymous

Message 3 of 6
in reply to: Anonymous

Hi Remy,


if you just want to display a message in a non-blocking manner,

you also could use a BalloonTip.


To use this, add a reference to AdWindows.dll to your VS project.

You can find it in the Revit program folder.


Then you could do this, for example as a static method in a "Utils" class:


public static void ShowBalloonTip(string category, string title, string text)
    Autodesk.Internal.InfoCenter.ResultItem ri = new Autodesk.Internal.InfoCenter.ResultItem();

    ri.Category = category;
    ri.Title = title;
    ri.TooltipText = text;    
    // optional: provide a URL, e.g. a website containing furter information
    ri.Uri = new System.Uri("");
    ri.IsFavorite = true;
    ri.IsNew = true;

    // you also could add a click event
    ri.ResultClicked += new EventHandler<Autodesk.Internal.InfoCenter.ResultClickEventArgs>(ri_ResultClicked);


private static void ri_ResultClicked(object sender, Autodesk.Internal.InfoCenter.ResultClickEventArgs e)
    // do some stuff...


Note that using functions of Revit's AdWindows.dll is not supported by Autodesk officially.

But since AutoCAD has its own version of that library, which is used by ACAD developers since many years, it seem to be a valid way.





Rudolf Honke
Software Developer
Mensch und Maschine

Message 4 of 6
in reply to: Anonymous

I am using the suggested method for overwriting the status text to show the users of my addin that a long list of items is being processed ( SetStatusText($"Processing {idx++}/{total} file {fname}"); )


This works as it should but I get complaints from users that sometimes it does not update the status text after the first, so it will continue showing "Processing 1/1147 file test.rfa" even though the addin code keeps looping through the list and updates all 1147 files.


is there a known condition in the C# api that may cause Revit to not update the status text through the user32.dll SetWindowText?

Message 5 of 6

It is a very old link and likely always unsupported.


What happens when Revit want's to set it's own status bar text, this is probably part of the issue. Perhaps you are getting a blocking situation.


I would say use modeless child window with status bar but those aren't always easy to get working (in terms of updating). You can then also have a cancel button however.

Message 6 of 6
in reply to: Anonymous


Mauricio Jorquera

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups

Rail Community