Is it possible to lock elements in layout view in Python? I know it is possible in the production cartography extension from ESRI but all I need is the funcionality to lock elements. I am wondering if there is a way to do this in Python.


To "lock" layout elements in position you could run a Python script that iterates through all of them (ListLayoutElements) and then uses their name property to lookup values you want for their elementPositionX, elementPositionY, elementHeight and elementWidth properties. Running this script any time that you want to be certain elements are in their correct position would move any that have strayed back to the position and size you had set.

  • That sounds pretty awesome and that will work. I figured there probably wasn't a way to duplicate the functionality of being able to select and lock elements in place – user14773 Feb 1 '13 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.