GetService Method


Returns an instance of an object that represents the external service with the given Id.

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

Syntax

C#
public static ExternalService GetService(
	ExternalServiceId serviceId
)
Visual Basic
Public Shared Function GetService ( _
	serviceId As ExternalServiceId _
) As ExternalService
Visual C++
public:
static ExternalService^ GetService(
	ExternalServiceId^ serviceId
)

Parameters

serviceId
Type: Autodesk.Revit.DB.ExternalServiceExternalServiceId
Id of the service.

Return Value

The instance of the service or NULL if it cannot be found.

Remarks

The returned instance is either of type SingleServerService or MultiServerService. Users should cast the returned object to one of the classes if they need access to active servers.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null

See Also