Worksharing |
public static ISet<ElementId> CheckoutElements( Document document, ISet<ElementId> elementsToCheckout, TransactWithCentralOptions options )
Exception | Condition |
---|---|
ArgumentException | document is not a workshared document. -or- document is not a primary document, it is a linked document. -or- One or more elements in elementsToCheckout do not exist in the document. -or- Saving is not allowed in the current application mode. |
ArgumentNullException | A non-optional argument was null |
CentralFileCommunicationException | Editing permissions for the file-based central model could not be accessed for write, e.g. the network is down, central is missing, or central is read-only. |
CentralModelAccessDeniedException | Access to the central model was denied. A possible reason is because the model was under maintenance. |
CentralModelContentionException | Editing permissions for the central model are locked and the last attempt to lock was canceled. -or- The central model is being accessed by another client. |
CentralModelException | An error has occurred while checking out worksets or elements. -or- The central model is overwritten by other user. -or- The central model is missing. -or- An internal error happened on the central model, please contact the server administrator. |
CentralModelVersionArchivedException | Last central version merged into the local model has been archived in the central model. This exception could only be thrown from cloud models. |
RevitServerCommunicationException | The server-based central model could not be accessed because of a network communication error. |
RevitServerInternalException | An internal error happened on the server, please contact the server administrator. |
For best performance, checkout all elements in one big call, rather than many small calls.
Revit may check out additional elements that are needed to check out the elements you requested. For example, if you request an element that is in a group, Revit will check out the entire group.