/// <summary> /// Gets a list of the filters for a collector. /// </summary> /// <param name="collector">A Syntehtic Collector</param> /// <returns name="ElementFilters">A list of ElementFilters</returns> public static List <RevitDB.ElementFilter> GetFilters(Collector collector) { return(collector._filters); }
/// <summary> /// Sets the ElementFilters for the collector. /// </summary> /// <param name="collector">A Synthetic Collector</param> /// <param name="filters">A list of ElementFilters</param> /// <returns name="collector">A Synthetic Collector with assigned ElementFilters.</returns> public static Collector SetFilters(Collector collector, List <RevitDB.ElementFilter> filters) { collector._filters = filters; return(collector); }
/// <summary> /// Retrieves the Elements that pass the Collector's filters /// </summary> /// <param name="collector">A Synthetc Collector</param> /// <param name="toggle">Toggle will reset the Dynamo graph and rerun the collector.</param> /// <returns name="Elements">Autodesk.Revit.DB.Elements</returns> public static IList <RevitDB.Element> ToRevitElements(Collector collector, [DefaultArgument("true")] bool toggle = true) { return((List <RevitDB.Element>)collector._ApplyFilters().ToElements()); }
/// <summary> /// Retrieves the ElementIds of elements that pass the Collector's filters. /// </summary> /// <param name="collector">A Syntehtic Collector</param> /// <returns name="ElementIds">Returns the ElementIds of the elements that pass the collector's filters.</returns> public static IList <RevitDB.ElementId> ToElementIds(Collector collector) { return((IList <RevitDB.ElementId>)collector._ApplyFilters().ToElementIds()); }
/// <summary> /// Applies filters and returns the Revit FilteredElementCollector object. This object gives quick access to the elements in the collector. /// </summary> /// <param name="collector">A Synthetic Collector object.</param> /// <returns name="Revit Collector">A Revit FilteredElementCollector object.</returns> public static RevitCollector ApplyFilters(Collector collector) { return(collector._ApplyFilters()); }