Have a question. How do you tell or write in code to tell ArcMap to open and closed and wait for a few minutes before you go to the next code and then open Arc map and then closed again ? Is there a syntax or code for that ?
I want to write that on my pyscripter because when I wrote coded to export a lot of PDF from each ArcMap mxd in Citrix and I use Pyscripter on Windows. Citrix is different world and is not the same as you see ArcGIS on PC/Windows. Citrix is more of like a cloud and uses the internet and is kind of slow to open and closed.
Sometimes when you run it and then some of them will bail it out for no reason. I was thinking it has something to do with open ArcMap and then closed it after export a pdf and then use del mxd. Yes, it has an image in it and it uses Imagine file.
Let me know if you need further question from me...
Are you sure you need to open ArcMap at all? You can work with things you normally associate with ArcMap (mxds, layers, exporting maps, etc.) from Python (PyScripter) without actually loading the ArcMap application. Are you actually opening the ArcMap application, or just assigning an mxd to a variable?
I suppose you could try something like the following, although I've can't think of a time where hardcoding a sleep time solved the real problem:
import time time.sleep(60) # wait for 60 seconds