Nice, thanks for your help. For information, this is what I did in vb.net:
Dim pageview As Rhino.Display.RhinoPageView = TryCast(view, Rhino.Display.RhinoPageView)
Dim detailview As Rhino.DocObjects.DetailViewObject = pageview.GetDetailViews(0)
'Change the viewport to shadowed
pageview.SetActiveDetail(detailview.Attributes.ObjectId)
Dim display_mode_description As Rhino.Display.DisplayModeDescription = Rhino.Display.DisplayModeDescription.FindByName("Shaded")
Try
view.ActiveViewport.DisplayMode = display_mode_description
view.Redraw()
Catch ex As Exception
End Try
'Lock the detail viewport
detailview.DetailGeometry.IsProjectionLocked = True
detailview.CommitChanges()
detailview.CommitViewportChanges()
Hey,
I am doing the same thing but in C#, I cannot seem to lock the views of a layout.
If anyone can spot the issue here I would be very appreciative. I feel like I have basically the same code as what is shown above.
public static void LockAllDetails(RhinoDoc doc, RhinoPageView layout, bool locked)
{
layout.SetPageAsActive();
doc.Views.ActiveView = layout;
foreach (Rhino.DocObjects.DetailViewObject detail in layout.GetDetailViews())
{
// lock each detail in a loop //
layout.SetActiveDetail(detail.Id);
detail.DetailGeometry.IsProjectionLocked = true; // should be changed to locked //
detail.CommitChanges();
detail.CommitViewportChanges();
}
layout.SetPageAsActive();
doc.Views.ActiveView = layout;
doc.Views.Redraw();
}