IExternalCommand.Execute
Method
Description:
Overload this method to implement and external command within Revit.
Overload this method to implement and external command within Revit.
Parameters
Parameter | Type | Description |
---|---|---|
commandData | ExternalCommandData | An ExternalCommandData object which contains reference to Application and View needed by external command. |
message | String | Error message can be returned by external command. This will be displayed only if the command status was "Failed". There is a limit of 1023 characters for this message; strings longer than this will be truncated. |
elements | ElementSet | Element set indicating problem elements to display in the failure dialog. This will be used only if the command status was "Failed". |
Return Value
Type | Description |
---|---|
Result | The result indicates if the execution fails, succeeds, or was canceled by user. If it does not succeed, Revit will undo any changes made by the external command. |