PreviewViewId Property


The view id that will be used to generate the preview; this id is not saved to the document's permanent settings.

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

Syntax

C#
public ElementId PreviewViewId { get; set; }
Visual Basic
Public Property PreviewViewId As ElementId
	Get
	Set
Visual C++
public:
property ElementId^ PreviewViewId {
	ElementId^ get ();
	void set (ElementId^ value);
}

Field Value

The id must be valid for use as a preview view (check DocumentPreviewSettings.IsValidPreviewViewId()). Revit does not check validity when setting this value, only when the options are used in a call to SaveAs(). Default is InvalidElementId.

Remarks

If this id is set to a view id, the indicated view will be used to generate the preview even if DocumentPreviewSettings.PreviewViewId is also set.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException When setting this property: A non-optional argument was null

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 →