Batch change script or command to change the detail viewport display mode in layouts?

I’m working on large projects that require anywhere from 2-6 details on a layout. Is there a script, command, or plugin that is available that would allow me to batch change the display mode of the details on a current page or all pages at once?

I currently need to click into the detail to set the display mode for that detail and this becomes very tedious when I need to change many details in a set.

The match properties do not accomplish this task and this would be a great addition for layouts.

Any help is greatly appreciated! :grinning:


See if the attached script works for you: (1.7 KB)

import Rhino
import rhinoscriptsyntax as rs
import scriptcontext as sc
2021 03 09 script by Willem Derks ( per request:

def set_detail_displaymode(detail_id,mode_name):
    rs.Command('-Detail Enable ', echo=False)
    rs.Command('-SetDisplayMode Viewport=Active Mode={} '.format(mode_name), echo=True)
    rs.Command('-Detail EnablePage ', echo=False)

def get_current_layout_details():
    current =  sc.doc.Views.ActiveView.MainViewport
    current_id = current.Id
    current_details = []
    detail_ids = rs.ObjectsByType(32768)
    for detail_id in detail_ids:
        geom = rs.coercerhinoobject(detail_id)
        if geom.Attributes.ViewportId == current_id:
    return current_details

def set_all_details_displaymode():
    #get displaymode names
    mode_names = [mode.LocalName for mode in Rhino.Display.DisplayModeDescription.GetDisplayModes()]
    mode_name = rs.ListBox(mode_names, 'choose mod eto set details in')
    if not mode_name : return

    for view_name in rs.ViewNames(return_names = True, view_type=1):
        detail_ids = get_current_layout_details()
        for detail_id in detail_ids:


1 Like

This is fantastic!! Thank you kindly it works like a charm.

1 Like