this came up when I try to add a new type FamilyType type1 = pFamilyMgr.NewType(name);
If there is a type with given name exist, it popup a failed message. So I have to delete the old one first.
But with my code, it seems removed only type in the project environment, not in .rfa. When I open the .rfa, the type still be in there.
As you suggested, I researched http://thebuildingcoder.typepad.com/blog/2009/08/the-revit-family-api.html. I find out that if I want to delete a type from both project environment and family-file (.rfa), I have to do twice.
To delete a type from family-file (.rfa), to have to use DeleteCurrentType().
Is that correct?
Thanks.
Best Regard,
Nam.