Revit secondary development task dialog TaskDialog

The dialog box is a common function of Revit, which can prompt the result or error of a command in Revit. The basic code is as follows"

     TaskDialog mainDialog = new TaskDialog("Hello,TaskDialog !");

Its main attribute
AllowCancellation: If there is no cancel button, whether the current dialog box can be canceled

MainContent : The main content displayed on the interface

MainInstruction: Text highlighted in the content area

Title : Title

FooterText : the text to display at the bottom

DefaultButton: The default button of the current form, that is, the button executed by default.

ExpandedContent: The expanded content is not displayed by default, and is displayed only when the details button is clicked.

After ExtraCheckBoxText is set, a check box will appear, you can make any desired judgment and processing through the selection of this check box

MainIcon : the icon to display

TitleAutoPrefix : Specifies whether the text of the current dialog is automatically generated. According to the name of the current plugin

VerificationText : A selection box will be displayed

Main method:

AddCommandLink adds a command link

Show shows the dialog

WasExtraCheckBoxChecked Gets the state of the ExtraCheckBox button.

WasVerificationChecked Get the state of the VerificationChecked button

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324688089&siteId=291194637