•List<Element> families = new List<Element>();
•Filter filterFamily =
app.Create.Filter.NewTypeFilter( typeof( Family ) );
•doc.get_Elements( filterFamily, families );
•string sMsg = "Standard families already loaded in this
model:";
•foreach( Family f in families )
•{
• // Get its category name; notice that the Category
property is not
• // implemented for the Family class; use
FamilyCategory instead;
• // notice that that is also not always
implemented; in that case,
• // use the workaround demonstrated below, looking
at the contained
• // family symbols' category:
• sMsg += "\r\n
Name=" + f.Name
• + "; Category=" + ( ( null == f.Category ) ? "?" : f.Category.Name )
•
+ ";
FamilyCategory=" + ( ( null == f.FamilyCategory ) ? "?" : f.FamilyCategory.Name );
•}
•LabUtils.InfoMsg( sMsg );
–
§Categoryプロパティは常に未実装
§FamilyCategory プロパティは未実装の場合あり