2024 Method
Changes 3
M

WorksetTable.CanDeleteWorkset

Description:
Indicates if a workset can be deleted.
Remarks:

The workset can't be deleted in the following cases:

  • The input worksetId is not valid in the document.
  • The input worksetId doesn't represent a user-created workset, which means this workset might be a system workset.
  • The workset is not editable by the current user. In order to resolve this problem, please checkout the workset by calling [!:Autodesk::Revit::DB::WorksharingUtils::CheckoutWorksets].
  • The workset or some elements under the workset are owned by the other users. In order to resolve this problem, please ask the other users to call [!:Autodesk::Revit::DB::WorksharingUtils::RelinquishOwnership] to relinquish their ownership on the workset and elements.
  • The target workset is not a user-created workset.

public static bool CanDeleteWorkset(
	Document document,
	WorksetId worksetId,
	DeleteWorksetSettings deleteWorksetSettings
)
Return Value bool True if the workset can be deleted, false otherwise.