PreviewFamilyVisibilityDefaultOnState Property

Controls the default state of the PreviewFamilyVisibility mode in all views.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: (17.0.1090.0)
Since: 2016 Subscription Update


public static bool PreviewFamilyVisibilityDefaultOnState { get; set; }
Visual Basic
Public Shared Property PreviewFamilyVisibilityDefaultOnState As Boolean
Visual C++
static property bool PreviewFamilyVisibilityDefaultOnState {
	bool get ();
	void set (bool value);

Field Value

A boolean value to control whether the PreviewFamilyVisibility mode is to be turned On or Off in all views newly opened in a family editor.


This flag controls whether each newly opened view is to have the PreviewFamilyVisibility mode turned On by default or not. This property is applicable to all types of views. Views that support both Cut and Non-cut preview (such as floor plans) can be controlled further via the PreviewFamilyVisibilityDefaultUncutState property.

The settings is applicable to the whole application rather than to individual family documents; the value persists between Revit sessions. Although the value is allowed to be set at any time, any changes made after the Revit application has been initialized will not have effect until the next session of Revit.

After a view is opened with the default family preview state applied, its PreviewFamilyVisibility mode may be independently modified through the PreviewFamilyVisibility property. Once explicitly modified, the settings stays in effect for the respective view even after the view is closed and later reopened again.


Copy C#
public void SetDefaultPreviewFamilyVisibilityState()
    TemporaryViewModes.PreviewFamilyVisibilityDefaultOnState = true;
    TemporaryViewModes.PreviewFamilyVisibilityDefaultUncutState = true;
Public Sub SetDefaultPreviewFamilyVisibilityState()
    TemporaryViewModes.PreviewFamilyVisibilityDefaultOnState = True
    TemporaryViewModes.PreviewFamilyVisibilityDefaultUncutState = True
End Sub

See Also