Execute Method


Implement this method to execute the given server.

Namespace: Autodesk.Revit.DB.ExternalService
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2013

Syntax

C#
bool Execute(
	IExternalServer server,
	Document document,
	IExternalData data
)
Visual Basic
Function Execute ( _
	server As IExternalServer, _
	document As Document, _
	data As IExternalData _
) As Boolean
Visual C++
bool Execute(
	IExternalServer^ server, 
	Document^ document, 
	IExternalData^ data
)

Parameters

server
Type: Autodesk.Revit.DB.ExternalService IExternalServer
An instance of a server that is to be executed.
document
Type: Autodesk.Revit.DB Document
The associated document. It may be NULL if the service is not being executed in a document.
data
Type: Autodesk.Revit.DB.ExternalService IExternalData
The associated service data.

Return Value

True indicates a successful execution of the call. False indicates a failure.

If a multi-server service returns false from the call, the service manager will stop the execution loop and marks the service execution as unsuccessful.

Remarks

It is completely upon the service to decide what the communication with the server should be like, for it is the service provider who also defines what the server's interface looks like. It could be as simple as calling one method (e.g. Execute, Run, Calculate, etc.) or it could be a set of inquiries and executing calls to the server.

The framework invokes this method when the service is requested to be executed. The framework first checks what the applicable server (or servers, in a multi-server service) is and then it calls this method with that server as an argument.

See Also