Created
February 7, 2020 13:20
-
-
Save johnpierson/d945805995597c6243c010e3a22bdc12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment