Display a Message Box after running nodes

Hi all,

I’m trying to display a message box after running a set of nodes. However, Dyanmo seems to ignore any nodes before the message box script and displays the message box first and then run the nods. I tried it with Data-shapes and couple of custom python scripts and they all did the same thing. I even tried to force the message box script to wait for the other nodes with the “passing through” node, but still no luck so far!

Am I doing something wrong or this is how Dynamo deals with any UI nodes (Displays all windows first and then run the nodes)?

Thanks

The python script for the message box:

import clr
clr.AddReference(“RevitAPIUI”)
from Autodesk.Revit.UI import TaskDialog
msg = IN[0]
msgBox = TaskDialog
OUT = msgBox.Show(“Done!”,msg)

Place a Transaction.End node before your Python Script node. That way the changes to th emodel get committed before the message box is displayed.

1 Like

You can use Passthrough node from Clockwork package as well :slight_smile:

Thanks a lot. Working perfectly now!

Thanks HozzZam. Without the Transaction.End node, passthrough didn’t do it for me. However, combining these two nodes together allowed me to pop-up multiple windows, which is ultimately what i was looking for!

You can try it.

1 Like

I wanted to display an instructional message box in some of my Dynamo Player scripts only if needed parameters were missing.

So I started with the python script I found in the above posts (Thanks) and added to it - see: Message Box instruction if parameter missing

  • Rusty