GetWorksetId Method


Get Id of the Workset which owns the element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)

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

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also