I’m using the Rhythm Package which has this UI.UserMessage node. I’ve pulled the Python script out of it and am trying to get it so that it will display a ‘Yes’ and a ‘No’ button on the Dialog Box. I am having trouble, so far I am only able to input one button at a time. Does anyone have any experience with
import clr
import msvcrt
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
dialogContent = "You are about to delete all Fabrication Pipework content from the model. Are you sure?"
button = TaskDialogCommonButtons.Yes
result = TaskDialogResult.value__
TaskDialog.Show('Delete all MEP',dialogContent,button,result)
OUT = result
import clr
clr.AddReference("RevitAPIUI")
from Autodesk.Revit.UI import *
dialogContent = "You are about to delete all Fabrication Pipework content from the model. Are you sure?"
buttons = TaskDialogCommonButtons.Yes | TaskDialogCommonButtons.No
#assigning this to a dialog result variable allows us to check what the user selected
dialogResult = TaskDialog.Show('Delete all MEP',dialogContent,buttons)
#define a return value parameter for use as an output
returnValue = False;
#if the user clicks yes, return true to continue
if dialogResult == TaskDialogResult.Yes:
returnValue = True
OUT = returnValue
@simon_murphy1 I don’t mind the DataShapes window, but I was looking for just a simple quick dialog box. I actually just set a dialog box with DataShapes.
@john_pierson you’re the Man!! That is exactly what I was looking for! Thank you so much, I’ll have to re-download the package then lol