SetServerState Method


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: 22.0.0.0 (22.1.0.0)
Since: 2013

Syntax

C#
public bool SetServerState(
	Guid serverId,
	Document document,
	bool bActive
)
Visual Basic
Public Function SetServerState ( _
	serverId As Guid, _
	document As Document, _
	bActive As Boolean _
) As Boolean
Visual C++
public:
bool SetServerState(
	Guid serverId, 
	Document^ document, 
	bool bActive
)

Parameters

serverId
Type: System Guid
Id of the server to switch active state for.
document
Type: Autodesk.Revit.DB Document
Document for which to activate this server. If null, server will activate globally.
bActive
Type: System Boolean
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).

See Also