BringToFront Method (Document, View, ElementId)


Places the given detail instance in the front of all other detail instances in the view.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013

Syntax

C#
public static void BringToFront(
	Document document,
	View view,
	ElementId detailElementId
)
Visual Basic
Public Shared Sub BringToFront ( _
	document As Document, _
	view As View, _
	detailElementId As ElementId _
)
Visual C++
public:
static void BringToFront(
	Document^ document, 
	View^ view, 
	ElementId^ detailElementId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
view
Type: Autodesk.Revit.DB View
The view in which the detail appears.
detailElementId
Type: Autodesk.Revit.DB ElementId
The detail element.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The document does not support detail draw order. Only projects and 3d families support draw order. 2d families and in-place families do not support draw order. -or- The element detailElementId is not a detail or it does not participate in detail draw ordering. Details must be visible in the view. -or- In 3d families, detail draw order can only be adjusted in views that are parallel to the document's X, Y or Z axes.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also