AddCommandLink Method (TaskDialogCommandLinkId, String, String)


Adds a CommandLink associated to the given id, displaying the indicating main and supporting content.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2011

Syntax

C#
public void AddCommandLink(
	TaskDialogCommandLinkId id,
	string mainContent,
	string supportingContent
)
Visual Basic
Public Sub AddCommandLink ( _
	id As TaskDialogCommandLinkId, _
	mainContent As String, _
	supportingContent As String _
)
Visual C++
public:
void AddCommandLink(
	TaskDialogCommandLinkId id, 
	String^ mainContent, 
	String^ supportingContent
)

Parameters

id
Type: Autodesk.Revit.UI TaskDialogCommandLinkId
The id of the CommandLink. This corresponds to the value returned by Show() when the link is chosen by the user.
mainContent
Type: System String
The main content of the CommandLink.
supportingContent
Type: System String
The main content of the CommandLink.

Remarks

Parameter mainContent cannot contain newlines.

If the id has already been set to the task dialog, the new CommandLink definition overrides the old one.

CommandLinks will always be shown in the dialog in the order of their ids.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when mainContent is a null reference ( Nothing in Visual Basic) .
Autodesk.Revit.Exceptions ArgumentException Thrown when mainContent is an empty string.
Autodesk.Revit.Exceptions ArgumentException Thrown when the mainContent contains newline characters.

See Also