+ Reply to Thread
Results 1 to 8 of 8

Thread: Pause Map refresh using python code

  1. #1
    Essam Elhalhuli
    Join Date
    Feb 2013
    Posts
    10
    Points
    1
    Answers Provided
    0


    0

    Default Pause Map refresh using python code

    I have script that I run from the python window in arcmap that creates intermediate feature classes that I then delete once the final feature class is created.
    The problem is I cannot find a way to stop ArcMap plotting these intermediate feature classes and refreshing the map as each one is created.
    Is there a way to pause the map update (using code) that I can incorporate in my script?

  2. #2
    Douglas Sands
    Join Date
    Nov 2010
    Posts
    66
    Points
    52
    Answers Provided
    4


    0

    Default Re: Pause Map refresh using python code

    Is there anything preventing you from running the script outside of ArcMap (eg as a tool in ArcCatalog by simply executing the python script)?

  3. #3
    Essam Elhalhuli
    Join Date
    Feb 2013
    Posts
    10
    Points
    1
    Answers Provided
    0


    0

    Default Re: Pause Map refresh using python code

    Hi Doug,

    The script uses the current map extent and CRS.
    My end game hope is to make this an add-in as there are no other parameters required

  4. #4
    Chris Snyder

    Join Date
    May 2010
    Posts
    1,262
    Points
    414
    Answers Provided
    38


    0

    Default Re: Pause Map refresh using python code

    Is there a way to pause the map update (using code) that I can incorporate in my script?
    Not a direct way to do this I think, but how just turning the layers off until the script is done executing? A related post: http://forums.arcgis.com/threads/947...l=1#post338920

  5. #5
    Essam Elhalhuli
    Join Date
    Feb 2013
    Posts
    10
    Points
    1
    Answers Provided
    0


    1

    Default Re: Pause Map refresh using python code

    The best option I have found so far is to use arcgisscripting.

    Using before the intermediate creations:
    gp = arcgisscripting.create()
    gp.AddOutputsToMap = False

    Then before the final featureclass:
    gp.AddOutputsToMap = True

    Does the job, shame to have to resort to the old library

  6. #6
    Douglas Sands
    Join Date
    Nov 2010
    Posts
    66
    Points
    52
    Answers Provided
    4


    1

    Default Re: Pause Map refresh using python code

    Quote Originally Posted by elhalhuli View Post
    The best option I have found so far is to use arcgisscripting.

    Using before the intermediate creations:
    gp = arcgisscripting.create()
    gp.AddOutputsToMap = False

    Then before the final featureclass:
    gp.AddOutputsToMap = True

    Does the job, shame to have to resort to the old library
    If you are in ArcMap and hit the pause button in the lower left corner, can you still run the tool?

    ... or ...

    have you tried to change the environment setting?

    arcpy.env.addOutputsToMap

    - Russell

  7. #7
    Essam Elhalhuli
    Join Date
    Feb 2013
    Posts
    10
    Points
    1
    Answers Provided
    0


    0

    Default Re: Pause Map refresh using python code

    Quote Originally Posted by doug.sands View Post
    If you are in ArcMap and hit the pause button in the lower left corner, can you still run the tool?

    ... or ...

    have you tried to change the environment setting?

    arcpy.env.addOutputsToMap

    - Russell
    arcpy.env.addOutputsToMap does the trick !!
    Thanks for your help

  8. #8
    Matt Sayler
    Join Date
    Apr 2010
    Posts
    120
    Points
    61
    Answers Provided
    6


    0

    Default Re: Pause Map refresh using python code

    Just asked about this in a support ticket last week. There isn't currently a way to pause drawing using python. Someone has posted an Idea to add the functionality though, which I would encourage people to vote for: http://ideas.arcgis.com/ideaView?id=087E00000004bUpIAI

+ Reply to Thread

Tags for this 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