Description
Lock detail views on all layouts.
See also
UnlockDetailsOnAllLayouts script.
Author and license
Script by MLAV.LAND, licensed under the GNU GPL 3 License.
Code
import rhinoscriptsyntax as rs
# Iterate through each layout view
for view_name in rs.ViewNames(return_names=True, view_type=1):
# Set the current view to the layout
rs.CurrentView(view_name)
# Get all details in the layout
detail_ids = rs.ObjectsByType(32768) # 32768 is the object type constant for detail views
# Lock all the details found in the current layout
if detail_ids:
for detail_id in detail_ids:
rs.DetailLock(detail_id, lock=True)