Message 1 of 2
List of parameters associated to the category

Not applicable
07-02-2018
03:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everybody,
I am trying to get the parameters for each category in an EMPTY project. The code I am using is:
var document = commandData.Application.ActiveUIDocument.Document;
FilteredElementCollector collector = new FilteredElementCollector(document);
var elements = collector.WhereElementIsElementType().Where(w => w.Category != null && w.Category.CategoryType == CategoryType.Model).ToList();
var dictionary = elements.GroupBy(w => w.Category.Id.IntegerValue).ToDictionary(w => w.Key, w => w.ToList());
The problem is this code do not catch all categories, for example Air Terminals.
Any help is welcomed.
Thanks,
Javi