Message 1 of 2
How to get Elements that can be value of parameter(StorageType = ElementId)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I want to get elements list that can be value of parameter(StorageType = ElementId).
I used this code.
Element ele = Doc.GetElement(param.AsElementId());
List<ElementId> ids = new FilteredElementCollector(Doc).OfCategory((BuiltInCategory)ele.Category.Id).Select(x => x.Id).ToList();
It works well. But it can't when param.AsElementId = -1.
So I want to know the way when param.AsElementId = -1.