WorksharingUtilsGetUserWorksetInfo Method

Gets information about user worksets in a workshared model file, without fully opening the file.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static IList<WorksetPreview> GetUserWorksetInfo(
	ModelPath path
)

Parameters

path  ModelPath
The path to the workshared model.

Return Value

IListWorksetPreview
Information about all the user worksets in the model. The list is sorted by workset id.
Exceptions
ExceptionCondition
ArgumentNullException A non-optional argument was null
CentralModelAccessDeniedException Access to the central model was denied due to lack of access privileges. -or- Access to the central model was denied. A possible reason is because the model was under maintenance.
CentralModelContentionException The central model are locked by another client.
CentralModelException The central model is missing. -or- The central model is corrupt or not an RVT file. -or- The model is not workshared. -or- The central model is overwritten by other user. -or- An internal error happened on the central model, please contact the server administrator.
FileAccessException The model could not be accessed due to lack of access privileges.
FileArgumentNotFoundException The Revit model specified by path doesn't exist.
FileNotFoundException The model could not be found at the specified path.
InvalidOperationException This functionality is not available in Revit LT.
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.
Remarks
This method provides a preview of the user worksets available in a file, allowing an application to look up the necessary workset ids and information to properly fill out a WorksetConfiguration structure before opening or linking to this model.
See Also