Application: HelloRevit
Revit Platform: All
Revit Version: 2011.0
First Released For: 8.1
Programming Language: VB.NET
Skill Level: Beginning
Category: Basics
Type: ExternalCommand

Subject: Add ExternalCommand to the Revit user interface.
Summary: 
Shows how a basic ExternalCommand can be added to the Revit user interface. It uses a Revit task dialog to communicate information to the interactive user.

Classes: 
Autodesk.Revit.UI.IExternalCommand 
Autodesk.Revit.UI.TaskDialog

Project Files: 
·	HelloRevit.vb
This file contains a class Command which inherits from IExternalCommmand interface. The function of the class is to add an external command to the Revit and create a Revit task dialog in Execute method to show some information of Revit to user. User can do anything in Execute method like create task dialog, fetch some information from Revit, and operate Element and so on. Here just take task dialog for example.

Description: 
The sample defines a class which inherits from IExternalCommand interface, and implements the Execute method with creating a task dialog in its body. 
·	The task dialog has Title, Main Instruction, Main Content, 2 Command Links, footer text, and OK/Cancel buttons. See as below:

·	If push Command Link1, a task dialog with default Close button shows the information about the Revit Build.

·	If push Command Link2, a task dialog created by static show () method shows the information about the Active Document.

Instructions: 
1.	Run the command.
2.	The task dialog will be popped up.
3.	Click commandLink, corresponding dialog will pop up.

Notes:
For as consistent as possible with native Revit dialogs, API developers should create task dialogs according to the Revit standards. More information, please refer to API Developer’s Guide.