Share

ExternalServiceRegistry.ExecuteService(Guid, Guid, IExternalData) Method

Execute the service by the given server.


Namespace: Autodesk.Revit.DB.ExternalService
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)

Syntax

C#

public static ExternalServiceResult ExecuteService(
	Guid executionKey,
	Guid serverId,
	IExternalData data
)

Parameters

executionKey  Guid
Access key of the service to be executed. The key is not the same as the service's Id. It is the value that was returned to the caller who registered the service.
serverId  Guid
the specific server to execute
data  IExternalData
The associated data. The type must be of the class defined by the service.

Return Value

ExternalServiceResult
The result of executing the external service.

Exceptions

ExceptionCondition
ArgumentNullException A non-optional argument was null

Remarks

Execution of a service should be invoked only by the application that registered the service. The execution will use the given server.

The serverId must be of a valid server that is currently registered for the service, ArgumentException be thrown if it is not available.

Because this method executes an explicitly specified server regardless of what other servers are currently active, it can only be invoked for a service that is not set as being recordable.

Plese also note that this method does not have any effect on active servers currently set for the service.

See Also

Reference

Was this information helpful?