- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to get family types available in the document. It looks, that I've found a simple example how to deal with family types here:
public void GetFamilyTypesInFamily(Document familyDoc) { if (familyDoc.IsFamilyDocument) { FamilyManager familyManager = familyDoc.FamilyManager; // get types in family string types = "Family Types: "; FamilyTypeSet familyTypes = familyManager.Types; FamilyTypeSetIterator familyTypesItor = familyTypes.ForwardIterator(); familyTypesItor.Reset(); while (familyTypesItor.MoveNext()) { FamilyType familyType = familyTypesItor.Current as FamilyType; types += "\n" + familyType.Name; } TaskDialog.Show("Revit",types); } }
However, after I run this function I get this :
Though I'm quite new to Revit and it's API, as I understand I have at least 2 family types (pp1 and pp2), so why I do not get them?
Solved! Go to Solution.