Update viewport display mode of RhinoPageView

Try to update the viewport display mode of the RhinoPageView like below, it doesn’t work, any ideas? Thanks so much!

foreach (var view in doc.Views)
{
    if (view is RhinoPageView)
    {
            var detailView = view as RhinoPageView;
            var detailViews = detailView.GetDetailViews();
            foreach (var pageView in detailViews)
            {
                pageView.IsActive = false;
                pageView.Viewport.DisplayMode = DisplayModeDescription.GetDisplayMode(DisplayModeDescription.RenderedId);
                pageView.Viewport.ZoomExtents();
       }
    }
}

Hi @Robin3,

Does this sample help any?

SampleCsDetailDisplayMode.cs

– Dale

Got it, Thanks Dale!

Thanks Dale, another question, we want plot the detail view to image using Rhino ViewCapture, however, when plot to image, it show as the first photo, when plot to PDF, it show as the second photo, how to plot to image as the second photo then? Thanks Again!

We also tried, RunScript("_-Print printer printername"), but we can selected “Rhino PDF” printer, we can not select “Image File(PNG,…)” printer, not sure what is the printer name. Thanks!

image