Returns the active workset's WorksetId.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 18.0.0.0 (18.2.0.13)
Since:
2012
Syntax
Visual Basic |
---|
Public Function GetActiveWorksetId As WorksetId |
Visual C++ |
---|
public:
WorksetId^ GetActiveWorksetId() |
Return Value
WorksetId of the active workset.
Examples
CopyC#
public Workset GetActiveWorkset(Document doc)
{
WorksetTable worksetTable = doc.GetWorksetTable();
WorksetId activeId = worksetTable.GetActiveWorksetId();
Workset workset = worksetTable.GetWorkset(activeId);
return workset;
}
CopyVB.NET
Public Function GetActiveWorkset(doc As Document) As Workset
Dim worksetTable As WorksetTable = doc.GetWorksetTable()
Dim activeId As WorksetId = worksetTable.GetActiveWorksetId()
Dim workset As Workset = worksetTable.GetWorkset(activeId)
Return workset
End Function
See Also