Returns the design option to which the element belongs.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Syntax
Visual Basic |
---|
Public ReadOnly Property DesignOption As DesignOption
Get |
Remarks
Examples
CopyC#
void Getinfo_DesignOption(Document document)
{
UIDocument uidoc = new UIDocument(document);
ICollection<ElementId> selectedIds = uidoc.Selection.GetElementIds();
foreach (ElementId id in selectedIds)
{
Element element = document.GetElement(id);
if (element.DesignOption != null)
{
TaskDialog.Show("Revit",element.DesignOption.Name.ToString());
}
}
}
CopyVB.NET
Private Sub Getinfo_DesignOption(document As Document)
Dim uidoc As New UIDocument(document)
Dim selectedIds As ICollection(Of ElementId) = uidoc.Selection.GetElementIds()
For Each id As ElementId In selectedIds
Dim element As Element = document.GetElement(id)
If element.DesignOption IsNot Nothing Then
TaskDialog.Show("Revit", element.DesignOption.Name.ToString())
End If
Next
End Sub
See Also