Filtering Parameters where keynote is empty

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I"m trying to use the FilteredElementCollector to find all WallTypes that have an empty Keynote (which has StorageType = string).
My code is as follow:
var collector = newFilteredElementCollector(doc);
collector.OfClass(typeof(WallType));
var keynoteValueProvider = newParameterValueProvider(newElementId(BuiltInParameter.KEYNOTE_PARAM));
var noKeynoteRule = newFilterStringRule(keynoteValueProvider, newFilterStringEquals(), String.Empty, false);
var noKeynoteFilter = newElementParameterFilter(noKeynoteRule);
collector.WherePasses(noKeynoteFilter);
still my collector always returns 0 element. If I change the String.Empty to an existing value. It works acordingly. And if I change String.Empty to null it throws an exception.
Is there any way to do this?
Thanks,
Felipe