PreviewControl Constructor


Constructs a preview control.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2013

Syntax

C#
public PreviewControl(
	Document document,
	ElementId viewId
)
Visual Basic
Public Sub New ( _
	document As Document, _
	viewId As ElementId _
)
Visual C++
public:
PreviewControl(
	Document^ document, 
	ElementId^ viewId
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document.
viewId
Type: Autodesk.Revit.DBElementId
The view id want to browse in this control.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullExceptionThrown when dbDocument or viewId is a null reference (Nothing in Visual Basic).
Autodesk.Revit.ExceptionsArgumentException Thrown when the given document is a linked document or the given viewId is invalid or the view is a schedule or other non-graphical view such as schedule views or the project browser view.
Autodesk.Revit.ExceptionsInvalidOperationException Thrown when there is an active preview control already.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →