Select to view content in your preferred language

Cannot open current map document

732
0
07-29-2011 12:15 AM
LobkeDeblaere
Occasional Contributor
I'm new to python and I'm trying to change one of our vba scripts to python so that it will work in later versions of arcmap

The script does the following
The user selects a polygon and presses a UI Button
A window pops up with a combobox filled with values from a access database, the user selects one and presses a 'Next' button
The scripts does a 'select by location' on all other layers, using the selected polygon. 
The data from the access database and the layers is exported to an excel report.

So far I have the window popping up with the data of the access database,  I can select one and export it to the excel report.  But when I try using the current map document I'm getting an error 'cannot open map document'

mxd = arcpy.mapping.MapDocument("CURRENT")

The script is running in the foreground.

What could be the problem? I'm stuck here
Tags (2)
0 Kudos
0 Replies