MultiServerService.SetServerState
Description:
This method will simply switch the active state of a server without affecting in any way the other servers.
This method will simply switch the active state of a server without affecting in any way the other servers.
Remarks:
For a service which has cref="Autodesk::Revit::DB::ExternalService::SupportActivation" set to false calling this method will throw exception.
For a service which has cref="Autodesk::Revit::DB::ExternalService::SupportActivation" set to false calling this method will throw exception.
public bool SetServerState(
Guid serverId,
Document document,
bool bActive
)
-
serverIdId of the server to switch active state for.
-
documentDocument for which to activate this server. If null, server will activate globally.
-
bActiveTrue to activate server, false to deactivate.
Return Value
Boolean
True if operation succeeded (even if the server state was not changed), false otherwise (e.g. when serverId is invalid).
-
For a service that doesn't support activation, the servers can't be activated/deactivated.