Here is an all python way with a true/false toggle as well.
import clr
import msvcrt
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
button = TaskDialogCommonButtons.None
result = TaskDialogResult.Ok
if IN[0] == True:
TaskDialog.Show('User Text',IN[1],button)
result = IN[1]
else:
result = "Set run to true"
OUT = result
@john_pierson, @erfajo, nice solutions! Almost What I wanted. The only thing left is, when you go to the “else” part, is there a way to break the script at that point, so it doesn’t have to go further lacking the input elements?
import clr
import msvcrt
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
result = TaskDialogResult.Ok
if IN[0] == True:
TaskDialog.Show('User Text',IN[1])
result = IN[1]
else:
result = "Set run to true"
OUT = result
this solution gets the same result. So why did you put it?