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

Element.DesignOption

Property
Description:
Returns the design option to which the element belongs.
Remarks:
If the element is not in a design option, i.e. in the main model, then this property will return null.
Syntax
public DesignOption DesignOption { get; }
Examples
void Getinfo_DesignOption(Document document)
{
    // Get the selected Elements in the Active Document
    UIDocument uidoc = new UIDocument(document);
    ICollection<ElementId> selectedIds = uidoc.Selection.GetElementIds();

    foreach (ElementId id in selectedIds)
    {
        Element element = document.GetElement(id);
        //Use the DesignOption property of Element
        if (element.DesignOption != null)
        {
            TaskDialog.Show("Revit",element.DesignOption.Name.ToString());
        }
    }
}