Execute the service by the given server.
Namespace: Autodesk.Revit.DB.ExternalServiceAssembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013
Syntax
C# |
---|
public static ExternalServiceResult ExecuteService( Guid executionKey, Guid serverId, IExternalData data ) |
Visual Basic |
---|
Public Shared Function ExecuteService ( _ executionKey As Guid, _ serverId As Guid, _ data As IExternalData _ ) As ExternalServiceResult |
Visual C++ |
---|
public: static ExternalServiceResult ExecuteService( Guid executionKey, Guid serverId, IExternalData^ data ) |
Parameters
- executionKey
- Type: System..::..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
- Type: System..::..Guid
the specific server to execute
- data
- Type: Autodesk.Revit.DB.ExternalService..::..IExternalData
The associated data. The type must be of the class defined by the service.
Return Value
The result of executing the external service.
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.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was null |