<Code Lib>
👍 0 👁 13

TaskDialog Bug

by @mykolayakovchuk · Sep 17, 2026
Linked API Pages

Description

In the Revit 2024 and Dynamo(pyton 3) environment, the Show instance method doesn't always work as expected. If you encounter a 'missing argument' type of error, try using the static method of this class instead.

Code

pyRevit
#In the Revit 2024 and Dynamo environment, 
#the Show() instance method doesn't always work as expected. 
#If you encounter a 'missing argument' type of error, 
#try using the static method of this class instead.
#
#also see https://github.com/DynamoDS/DynamoRevit/issues/3350

import sys
import clr

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

user_choice =TaskDialog.Show("window title", 
    "window content (for example press yes to do any action)", 
    TaskDialogCommonButtons.Yes | TaskDialogCommonButtons.No);#standart pallete of buttons, see enum at api doc

if user_choice == TaskDialogResult.Yes:
    #user clicked yes button
guest@rvtdocs: ~/discuss

Want to join the conversation?

rvtdocs auth

Share & save code Comment on pages Save bookmarks Upvote snippets Gamification

Loading…