ViewDisplayDepthCueing.EnableDepthCueing doesn't work

ViewDisplayDepthCueing.EnableDepthCueing doesn't work

michael-coffey
Advocate Advocate
154 Views
1 Reply
Message 1 of 2

ViewDisplayDepthCueing.EnableDepthCueing doesn't work

michael-coffey
Advocate
Advocate

I've tried setting the EnableDepthCueing Property to true and false and it doesn't work.  I tested in versions 2020 to 2025 Preview.  Test with this macro on an elevation view with no template:

public void EnableDepthCueing()
{
	UIDocument uidoc = this.ActiveUIDocument;
	Document doc = uidoc.Document;
	
	var depthCueing = doc.ActiveView.GetDepthCueing();
	
	using (Transaction t = new Transaction(doc, "Turn on depth cueing"))
	{
		t.Start();
		
		depthCueing.EnableDepthCueing = true;
		
		t.Commit();
	}
}

 Set EnableDepthCueing false to turn off.  Please fix.  Thanks.

0 Likes
Accepted solutions (1)
155 Views
1 Reply
Reply (1)
Message 2 of 2

michael-coffey
Advocate
Advocate
Accepted solution

Nvermind.  Realized you have to use the View.SetDepthCueing method after changing the ViewDisplayDepthCueing object.  Couldn't see a way to delete this post.

0 Likes