- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to search and find all elements that are actually modelled in my project (walls, doors, beam, etc).
From this i will search all elements to find there category and write these to a list.
So far my code is:
List<string> catlist = new List<string>(); FilteredElementCollector col = new FilteredElementCollector(doc, doc.ActiveView.Id); foreach (Element e in col) { Category cat = e.Category; if (call.CategoryType == CategoryType.Model) { catlist.Add(cat.Name); } }
I am using the If(call.categorytype == categorytype.model) to try and filter out all non model items but the list still contains things like cameras which i dont want.
Any advice on a better way of achieving this greatly received!!!
Mike
Solved! Go to Solution.