Locking/Unlocking details

I can find out if details on a layout page are locked or not, but how do I lock or unlock them?

import scriptcontext as sc
#need a layout page active
if not sc.doc.Views.ModelSpaceIsActive:
    layout_page=sc.doc.Views.ActiveView
    details=layout_page.GetDetailViews()
    for i, det in enumerate(details):
        if det.Geometry.IsProjectionLocked:
            #what do I do here?

Thanks, --Mitch

Could you try CommitChanges() on the detail view object?

det.Geometry.IsProjectionLocked = False #or True
det.CommitChanges()
1 Like

Aha! Thanks! --Mitch