Multi |
Exception | Condition |
---|---|
ArgumentException | Some of the given Ids do not represent valid servers of the service. -or- The list of servers contains duplicates. The SetActiveServers method expects a set of unique servers. |
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. |
More than one server per document can be set as active at any given time in a multi-server service. A document does not have to have an explicitly set active servers though - the application-wide active servers would be normally used when the service is executed for such a document.
Having active servers for a document overrules the active servers set for the application. That means if the service gets executed in this particular document, the document-specific servers will be used instead of the application-wide ones.
It is possible to set servers as active when other servers already are active for that service in this document. Setting a new set or the same set but with a different order will automatically replace the previously active servers in that document
All the servers must be valid (registered with the service) and must be unique in the set. The set may be empty though which allows to unset active servers from a document, which means that the document will be executed with the currently active servers set application-wide
For a service which has cref="Autodesk::Revit::DB::ExternalService::SupportActivation" set to false calling this method will throw exception.