#! python 3
import rhinoscriptsyntax as rs
rs.EnableRedraw(False)
layout = rs.AddLayout("new layout")
detail = rs.AddDetail(layout, (1,1), (7,7))
old_scale = rs.DetailScale(detail)
new_scale = rs.RealBox("detail scale", old_scale)
rs.DetailScale(detail, 1.0, new_scale)
rs.EnableRedraw(True)
If a detail viewport is created while redraw is disabled, then subsequent calls to rs.DetailScale() incorrectly return 0 rather than the detail’s actual scale.