Grasshopper Python - How to show a pop up?

So, for example,

listA = [0,1,2,3,4]
if (len(listA) >= 5:
    display("Yes")
elif (len(listA) < 5:
    display("No")

Does there exist such feature to let it display in Rhino? A text display for five seconds for example.

Showing a pop up message would be something like this:

import rhinoscriptsyntax as rs

if x:
    result = rs.MessageBox("Super important messsage", 1 | 16)
    rs.MessageBox(result, 1 | 64, "Result")

or

import System

if x:
    System.Windows.Forms.MessageBox.Show("Some Message")

I don’t know how to “time” it though.

2 Likes

You can also print to the Rhino command-line, like so:

import Rhino 

Rhino.RhinoApp.WriteLine(”foo”)
1 Like