Revit contains different kinds of Worksets.
- User Created
- Families
- Project Standards
- Views
(e.g. Views exists to allow users to own specific views and their content for editing)
User-Created are the only ones which can be created/renamed by the users.
To collect all worksets (including non-usercreated ones), you can use this Python code.
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
import Autodesk
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument
collector = FilteredWorksetCollector(doc)
worksetnames = []
for c in collector:
worksetnames.append(c.Name)
OUT = collector, worksetnames