TemporaryViewModesPreviewFamilyVisibilityDefaultOnState Property

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

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public static bool PreviewFamilyVisibilityDefaultOnState { get; set; }

Property Value

Boolean
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.
Remarks

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.

Example
public void SetDefaultPreviewFamilyVisibilityState()
{
    TemporaryViewModes.PreviewFamilyVisibilityDefaultOnState = true;
    TemporaryViewModes.PreviewFamilyVisibilityDefaultUncutState = true;
}
See Also