Share

ViewDisplayDepthCueing Class

Represents the settings for depth cueing.

Inheritance Hierarchy

System.Object
  Autodesk.Revit.DB.ViewDisplayDepthCueing


Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)

Syntax

C#

public class ViewDisplayDepthCueing : IDisposable

The ViewDisplayDepthCueing type exposes the following members.

Properties

 NameDescription
Public propertyEnableDepthCueing True to enable depth cueing. False to disable it.
Public propertyEndPercentage The end percentage defines where depth cueing ends. Values between 0 and 100.
Public propertyFadeTo The fade to defines the maximum fading in per cent. Values between 0 and 100.
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyStartPercentage The start percentage defines where depth cueing starts. Values between 0 and 100.

Methods

 NameDescription
Public methodDisposeReleases all resources used by the ViewDisplayDepthCueing
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodSetStartEndPercentages Sets start and end percentages.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)

Example

C#

private void AdjustDepthCueing(View view)
{
    if (view.CanUseDepthCueing())
    {
        using (Transaction t = new Transaction(view.Document, "Change depth cueing"))
        {
            t.Start();
            ViewDisplayDepthCueing depthCueing = view.GetDepthCueing();
            depthCueing.EnableDepthCueing = true;
            depthCueing.FadeTo = 50;    // set fade to percent
            depthCueing.SetStartEndPercentages(0, 75);
            view.SetDepthCueing(depthCueing);
            t.Commit();
        }
    }
}

VB

Private Sub AdjustDepthCueing(view As View)
    If view.CanUseDepthCueing() Then
        Using t As New Transaction(view.Document, "Change depth cueing")
            t.Start()
            Dim depthCueing As ViewDisplayDepthCueing = view.GetDepthCueing()
            depthCueing.EnableDepthCueing = True
            depthCueing.FadeTo = 50
            ' set fade to percent
            depthCueing.SetStartEndPercentages(0, 75)
            view.SetDepthCueing(depthCueing)
            t.Commit()
        End Using
    End If
End Sub

See Also

Reference

Was this information helpful?