GetWorksetId Method
Get Id of the Workset which owns the element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.0.0.405)

Syntax

C#
public WorksetId GetWorksetId(
	ElementId id
)
Visual Basic
Public Function GetWorksetId ( _
	id As ElementId _
) As WorksetId
Visual C++
public:
WorksetId^ GetWorksetId(
	ElementId^ id
)

Parameters

id
Type: Autodesk.Revit.DB..::..ElementId
Id of the element.

Return Value

Id of the Workset which owns the element.

Remarks

Each element belongs to one and only one workset.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentNullException A non-optional argument was NULL

See Also