PreviewFamilyVisibility Property

The current state of the PreviewFamilyVisibility mode in the associated view.

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


public PreviewFamilyVisibilityMode PreviewFamilyVisibility { get; set; }
Visual Basic
Public Property PreviewFamilyVisibility As PreviewFamilyVisibilityMode
Visual C++
property PreviewFamilyVisibilityMode PreviewFamilyVisibility {
	PreviewFamilyVisibilityMode get ();
	void set (PreviewFamilyVisibilityMode value);


The state of the PreviewFamilyVisibility mode can be set only if the mode is currently available and enabled in the view. Even in such a condition, however, not all states are valid in all views. To ensure that the state to be applied is valid in the view, call the IsValidState(PreviewFamilyVisibilityMode) method first.

Even views which generally support temporary modes will have this particular mode available only when the document of the view is in the environment of the family editor.

This property affect only the view associated with this instance of TemporaryViewModes. When a view is opened for the first time, its state of the PreviewFamilyVisibility mode is determined based on the default settings which is controlled through the properties PreviewFamilyVisibilityDefaultOnState and PreviewFamilyVisibilityDefaultUncutState .


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


Exception Condition
Autodesk.Revit.Exceptions ArgumentException When setting this property: The given PreviewFamilyVisibilityMode is not applicable in the associated view.
Autodesk.Revit.Exceptions ArgumentOutOfRangeException When setting this property: A value passed for an enumeration argument is not a member of that enumeration
Autodesk.Revit.Exceptions InvalidOperationException When setting this property: The PreviewFamilyVisibility mode is either disabled or inapplicable in the associated view.

See Also