Data-Shapes - UI.MultipleInputForm Window Close Button

Hey all!

Is there anyway to change the behaviour of or remove the close window button on the Data-Shapes - UI.MultipleInputForm.

My script requires the user to select Revit links and sheets that they would like to keep. If they hit the cancel button, I’ve told the script to finish (Was Cancelled output becomes true). However if they hit the close window button, the Was Cancelled output is false and the script proceeds.

Thanks!!

Use a =! Node with a list.filterbyboolmask after the Data-Shapes Window node, that way only when the window is opened and “run” is pressed the values are parsed through.

I have a node in my package archvision called wasRunwasCancelled that you can use between the two forms. It will automate exactly what you are asking. It will run a message if user cancels, to inform them. I like to put result messages in all my graphs that run with UIs.

heres the code for it if you want:

import clr
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *

mybool1 = IN[0]
mybool2 = IN[1]


if mybool1 == True and mybool2 == True:
	msg = TaskDialog.Show("Goodbye!", "Operation was Canceled",
	TaskDialogCommonButtons.Ok)
	OUT = False 
elif mybool1 == True and mybool2 == False:	
    OUT = True
else: 
	OUT = False```