UnsetActiveServer Method


Single Server Service Unset Active Server Method

Unset the active server for the particular document.

Namespace: Autodesk.Revit.DB.ExternalService
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void UnsetActiveServer(
	Document document
)

Parameters

document Document
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
InvalidOperationException The operation is not allowed because the service is being executed. -or- For a service that doesn't support activation, the servers can't be activated/deactivated.
Remarks

After unsetting the active server, the document will be using the application-wide active server, if one was already set.

Note it is not possible to unset a server that acts as an application-wide active server for a service. On the other hand, there should be no reason to ever do so, for each and every registered service should have (ideally) an active server set applicatiton-wide.

For a service which has cref="Autodesk::Revit::DB::ExternalService::SupportActivation" set to false calling this method will throw exception. For this kind of service only one server can be added, and it will be marked by default as an application-wide active server.

See Also
ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →