GetWorksetId Method


Get Id of the Workset which owns the element.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.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.DBElementId
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.ExceptionsArgumentNullException A non-optional argument was null

See Also