FilteredWorksetCollector Class

This class is used to search, filter and iterate through a set of worksets.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBFilteredWorksetCollector

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class FilteredWorksetCollector : IEnumerable<Workset>, 
	IDisposable

The FilteredWorksetCollector type exposes the following members.

Constructors
 NameDescription
Public methodFilteredWorksetCollector Constructs a new FilteredWorksetCollector that will search and filter the set of worksets in a document.
Top
Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the FilteredWorksetCollector
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodFirstWorkset Returns the first workset to pass the filter(s).
Public methodFirstWorksetId Returns the id of the first workset to pass the filter(s).
Protected methodGetBasicIEnumeratorReturns an enumerator that iterates through a collection.
Public methodGetEnumeratorReturns an enumerator that iterates through a collection.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodGetWorksetIdIterator Returns a FilteredWorksetIdIterator to the worksets passing the current filter.
Public methodGetWorksetIterator Returns a FilteredWorksetIterator to the worksets passing the current filter.
Public methodOfKind Applies a WorksetKindFilter to the collector.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodToWorksetIds Returns the complete set of workset ids that pass the filter(s).
Public methodToWorksets Returns the complete set of worksets that pass the filter(s).
Public methodWherePasses Applies a workset filter to the collector.
Top
Remarks

Developers can assign a condition to filter the worksets that are returned. If no condition is applied, it attempts to access all the worksets in the document.

The collector will reset if you call another method to extract worksets. Thus, if you have previously obtained an iterator, it will be stopped and traverse no more worksets if you call another method to extract worksets.

See Also