I am attempting to change the view of a detail to zoom to a selected object so it will be centered in the detail then change the detail scale to be an even number (Scale: 1"=1’-0") or something similar. I have not been able to pass a detail guid into the rs.ZoomSelected() function and the Rhino command line option does not seem to working either.
import rhinoscriptsyntax as rs
detail = rs.GetObject("select a detail", rs.filter.detail)
layout=rs.CurrentView()
if detail:
rs.DetailLock(detail,False)
rs.CurrentDetail(layout,detail)
cmd="-_Zoom "
cmd+="Extents "
rs.Command(cmd)
rs.DetailScale(detail,12,2)
rs.DetailLock(detail,True)
I have attempted some RhinoScript options as well with no success, if anyone knows how this could be handled please let me know.
Thanks,
5chmidt