© 2010 Autodesk
Introduction to Revit 2011 API
Element Modification
Element Level – Family Type
§Change the family type of an instance (e.g., a wall and a door) 
<VB.NET>
    ''  e.g., an element we are given is a wall.          
    Dim aWall As Wall = elem
    ''  find a wall family type with the given name.         
    Dim newWallType As Element = ElementFiltering.FindFamilyType( m_rvtDoc, _
         GetType(WallType), "Basic Wall", "Exterior - Brick on CMU")
    ''  assign a new family type.          
    aWall.WallType = newWallType
</VB.NET>
<VB.NET>
    ''  e.g., an element we are given is a door.          
    Dim aDoor As FamilyInstance = elem
    ''  find a door family type with the given name.         
    Dim newDoorType As Element = ElementFiltering.FindFamilyType( _ 
         GetType(FamilySymbol), "M_Single-Flush", "0762 x 2032mm", _
         BuiltInCategory.OST_Doors)
    ''  assign a new family type.          
    aDoor.Symbol = newDoorType
</VB.NET>