+ Reply to Thread
Results 1 to 6 of 6

Thread: change Page and Print Setup from ArcPy?

  1. #1
    Paul Petersen
    Join Date
    May 2010
    Posts
    59
    Points
    2
    Answers Provided
    0


    0

    Default change Page and Print Setup from ArcPy?

    I'm starting to work with ArcPy (love it), and eventually want/need to migrate over our automated map atlases from VBA to ArcPy. One of my "old" functions that I need to carry over is to dynamically change the Page Size. This involves changing the data frame size and also the Page/Print size (File-->Page and Print Setup). I've found it quite easy to access the data frame properties via ArcPy, but cannot see how to change the Map Page Size using ArcPy. Can anyone point me in the right direction? Or is this not even possible?

  2. #2
    Jeff Moulds
    Join Date
    Oct 2009
    Posts
    141
    Points
    53
    Answers Provided
    8


    0

    Default Re: change Page and Print Setup from ArcPy?

    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://help.arcgis.com/en/arcgisdesk...002p000000.htm
    Regards,

    Jeff Moulds
    ESRI

  3. #3
    Paul Petersen
    Join Date
    May 2010
    Posts
    59
    Points
    2
    Answers Provided
    0


    0

    Default Re: change Page and Print Setup from ArcPy?

    thanks for the reply. Good to know I'm not missing anything. That workaround may work okay. Thanks. My other idea is that since I don't really have any map surrounds for this particular set of maps, perhaps I could just export the data frame, and not worry about the page size?

  4. #4
    Dean Robbins
    Join Date
    Aug 2011
    Posts
    3
    Points
    0
    Answers Provided
    0


    0

    Default Re: change Page and Print Setup from ArcPy?

    Quote Originally Posted by JeffMoulds View Post
    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://help.arcgis.com/en/arcgisdesk...002p000000.htm
    We have made several MXD templates (different sizes, frame sizes, elements/positions etc.). However, when we use the CHANGE LAYOUT button from the layout toolbar, the page and print setup settings do NOT carry over from the template. It would be nice to have those settings follow the template and update on switch.

  5. #5
    David B

    Join Date
    Oct 2009
    Posts
    339
    Points
    228
    Answers Provided
    33


    0

    Default Re: change Page and Print Setup from ArcPy?

    Quote Originally Posted by DeanRobbins View Post
    We have made several MXD templates (different sizes, frame sizes, elements/positions etc.). However, when we use the CHANGE LAYOUT button from the layout toolbar, the page and print setup settings do NOT carry over from the template. It would be nice to have those settings follow the template and update on switch.
    Are your templates set to "Use Printer Paper Settings" in the Page and Print Setup dialog?

  6. #6
    Bill Clingman
    Join Date
    Oct 2010
    Posts
    5
    Points
    0
    Answers Provided
    0


    0

    Default Re: change Page and Print Setup from ArcPy?

    I am having the opposite problem. An arcpy script that is meant only to find and replace a specific data source is changing my printer setup and page size settings in ALL of my map documents to my default printer, which totally fubars all of the map documents, which were set up for different printers/plotters. How do I keep the arcpy script from messing with the page size and printer settings?

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts