2025.3 Method
Changes 0
M

Workset.Create

Description:
Creates a new workset.
public static Workset Create(
	Document document,
	string name
)
  • document
    The document in which the new instance is created.
  • String
    name
    The workset name.
Return Value Workset Returns the newly created workset.
  • document is not a workshared document. -or- name is an empty string or contains only whitespace. -or- name cannot include prohibited characters, such as "{, }, [, ], |, ;, less-than sign, greater-than sign, ?, `, ~". -or- The given workset name is already in use.
  • A non-optional argument was null
  • The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
  • The document has no open transaction.