Change all Detail view display settings

Hi Guys,

Working on a LARGE file, with many layouts, I wonder is there a way to set all view ports (detail views) to wireframe display without having to go to each layout and manually change it. This takes way to long.

Cheers

D

I worked this one out in python with the help of this forum a while ago. I have another one that lists the options of view style, then applies your selection to all detail views.

import Rhino import scriptcontext as sc

def SetDetailsToWireframe(debug):
# Find the wireframe display mode
display_mode = Rhino.Display.DisplayModeDescription.FindByName(“Wireframe”)
if display_mode:
DebugPrint(display_mode, debug)
# Get all of the document’s page views
page_views = sc.doc.Views.GetPageViews()
if page_views:
# Process each page view
for page_view in page_views:
DebugPrint(page_view, debug)
# Get all of the page view’s details
details = page_view.GetDetailViews()
if details:
# Process each page view detail
for detail in details:
DebugPrint(detail, debug)
# If the detail’s display mode is not wireframe…
if detail.Viewport.DisplayMode.Id != display_mode.Id:
# …set it to wireframe.
detail.Viewport.DisplayMode = display_mode
detail.CommitViewportChanges()
# Redraw the page
page_view.Redraw()

def DebugPrint(object, debug):
if object and debug:
print object

SetDetailsToWireframe(True)

Here is a link to the above:

https://github.com/mcneel/rhino-developer-samples/blob/5/rhinopython/SampleSetDetailsToWireframe.py

– Dale

Whats the easiest way to implement this script and how does one turn the script off? Sorry new to the scripting idea in Rhino.

Hi @DanSummers,

You’ll need to start here:

http://developer.rhino3d.com/guides/rhinopython/

Or perhaps here:

http://developer.rhino3d.com/guides/rhinopython/your-first-python-script-in-rhino-windows/

– Dale

dale,

Thank for the script, works like a charm! :+1: