Get family types collection as project browser

Get family types collection as project browser

Anonymous
Not applicable
412 Views
1 Reply
Message 1 of 2

Get family types collection as project browser

Anonymous
Not applicable

Hi.

I need to get all types as listed in the project browser.

I use the next source code:

var types = new FilteredElementCollector(document).WhereElementIsElementType().Where(e=>((ElementType)e).Category != null).ToList();

However, the returned list contains more types that the showed in the project browser (see attached images).

What filter must I use to get the same list?

 

0 Likes
413 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Hard to say... I see no similarity or relationship at all between your two screen snapshots.

 

I would start out by trying to use GetFamilySymbolIds:

 

https://apidocs.co/apps/revit/2019/8989a269-c516-0ace-5365-864a61df1103.htm

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes