fraxinus

test if script is running in pane in ArcMap

Discussion created by fraxinus on Sep 25, 2012
Latest reply on Sep 25, 2012 by mahunter243
Is there a simple test one can do to check if a script is running inside a pane in ArcMap - so that I know if the data frames etc are available?

I guess one can always do something like this, but it doesn't feel very clean...
def isArcMap():
 try:
  arcpy.mapping.MapDocument("CURRENT")
  return True
 except:
  return False

Outcomes