Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I need my script to access the Page Orientation property of the current MXD, and switch it from portrait to landscape (or back). I've looked through the arcpy and arcpy.mapping documentation, and haven't had any luck. Does anyone know how to do this?

share|improve this question

2 Answers 2

Can't do it yet in 10.0 from arcpy.mapping, going to have to use .Net or comtypes.

share|improve this answer
    
I can change the page orientation using only hotkeys. Would there be a way to simulate keypresses in my python script? –  Tanner Aug 27 '10 at 21:01
3  

Sadly the answer is no. sorry

Even from ESRI Staff:

"There are currently no properties to read/change the page size using arcpy.mapping. As a workaround, you could create MXDs for each page size and oreintation you needed. The closest example I can think of is the "Creating a map book with facing pages" help topic. It doesnt use different pages sizes, however, it does use two MXDs, one for right facing pages, one for left facing pages. In your case, you may have one MXD for letter size, and one MXD for legal size, as an example."

http://forums.arcgis.com/threads/10361-change-Page-and-Print-Setup-from-ArcPy?p=32342#post32342

Possible Workaround is:

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00s90000002p000000.htm

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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