This method will simply switch the active state of a server without affecting in any way the other servers.
Namespace: Autodesk.Revit.DB.ExternalService
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- serverId
- Type: SystemGuid
Id of the server to switch active state for.
- document
- Type: Autodesk.Revit.DBDocument
Document for which to activate this server. If null, server will activate globally.
- bActive
- Type: SystemBoolean
True to activate server, false to deactivate.
Return Value
True if operation succeeded (even if the server state was not changed), false otherwise (e.g. when serverId is invalid).Remarks
For a service which has cref="Autodesk::Revit::DB::ExternalService::SupportActivation" set to false calling this method will throw exception.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsInvalidOperationException | For a service that doesn't support activation, the servers can't be activated/deactivated. |