@Mohamed_Arshad, are you sure.
I never assumed that, always assumed it returns all elements derived from ElementType (like documentation states: https://revapidocs.com/2020.htm?id=77793daa-5a26-b4d6-9019-4d998a55099e.htm )
@XARMA
.OfClass(typeof(FamilySymbol)) returns FamilySymbol elements, which is derived from ElementType
.WhereElementIsElementType() will return ElementType's, some may be FamilySymbol but doesn't have to be.
For instance take a Door familytype and a Wall type.
.OfClass(typeof(FamilySymbol)) will only return the Door familytype as it's derived from FamilySymbol and WallType isn't
.WhereElementIsElementType() will return both door and wall type because both are derived from ElementType
So depending what's you need UserFamily Type or all types will determine which to use.
- Michel
Ps Use RevitLookup addin to inspect how different elements are build.