RVTDocs.com
Namespace: Autodesk.Revit.DB Class: FamilyInstance

FamilyInstance.Symbol

Property
Description:
Returns or changes the FamilySymbol object that represents the type of the instance.
Remarks:
Setting this property will result in the type of the instance being changed. Related types can be found by examining the Family to which the symbol belongs.
Syntax
public FamilySymbol Symbol { get; set; }
Examples
public void GetInfo_FamilyInstance_Symbol(FamilyInstance familyInstance)
{
    string message = "FamilyInstance symbol: ";
    if (familyInstance.Symbol != null)
    {
        // Get FamilyInstance structural symbol
        message += "\nFamilyInstance structural symbol name is : " + familyInstance.Symbol.Name;

        // Rename the Symbol used by this FamilyInstance
        familyInstance.Symbol.Name = "TestFamilyInstanceSymbolName";

        // Get FamilyInstance structural symbol
        message += "\nFamilyInstance structural symbol name after set is : " + familyInstance.Symbol.Name;
    }
    TaskDialog.Show("Revit",message);
}