Returns an instance of an object that represents the external service with the given Id.
Namespace: Autodesk.Revit.DB.ExternalServiceAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
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.ExternalService..::..ExternalServiceId
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
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |