I found some useful posts on displaying a message box, for example after running nodes, such: Display a Message Box after running nodes (Thanks)
But I wanted to display an instructional message box in some of my Dynamo Player scripts only if needed parameters were missing.
I started with the python script I found in the above link and added to it as follows. Maybe it can be done more elegantly; if so, suggestions welcome.
Example usage shown in this image:
Custom node here:
from Autodesk.Revit.UI import TaskDialog
title = IN
msg = IN
show = IN
msgBox = TaskDialog
if show :
showit = msgBox.Show(title,msg)
showit = “OK”
OUT = showit