Hi, i'm trying to make a function that returns a list of elements that have the omniclass BuiltInParameter not set to something empty, i made this function but it's returning a list of the ElementTypes not the Elements themselves.
If anyone could help that would be great.
public List<Element> GetElementsWithThisParameter(Document doc, BuiltInParameter param)
{ ParameterValueProvider provider = new ParameterValueProvider(new ElementId((int)param)); FilterStringRule rule1 = new FilterStringRule(provider, new FilterStringEquals(), "", true); ElementParameterFilter filter1 = new ElementParameterFilter(rule1, true); return (new FilteredElementCollector(doc)) .WherePasses(filter1) .ToElements() as List<Element>; }