arcpy.mapping scripting environment NOT suppressing dialog box - possible bug

1881
2
01-21-2016 11:42 AM
KathleenCrombez
Occasional Contributor III

We are getting ready to upgrade our enterprise database to 10.3 which no longer supports application connections.

So I have written a script that will walk through all mxd files in a directory and replace all the application connections with direct connects.

The problem I've encountered...

When a mxd document has connections that do not save the username and password a dialog box pops up and the script pauses until the dialog box is manually closed.

According to Example 4 in ESRIs documentation MapDocument—Help | ArcGIS for Desktop

We simply need to create a connection using the Create ArcSDE Connection File—Help | ArcGIS for Desktop  tool before calling the MapDocument function.

Since my main goal is to use direct connects instead of application connections I am using Create Database Connection—Help | ArcGIS for Desktop  instead and it is not suppressing the dialog box.

And in the ListBrokenDataSources—Help | ArcGIS for Desktop  documentation it clearly states "The arcpy.mapping scripting environment will, by default, supress these dialogs during execution".

This does not seem to be the case and is a major issue when we have hundreds maybe even thousands of mxd files to update.

Esri Technical Support Please advice on how to suppress the dialog in the arcpy.mapping scripting environment.

0 Kudos
2 Replies
KathleenCrombez
Occasional Contributor III

Can anyone from ESRI comment on this?

This is a serious show stopper for automating tasks!

0 Kudos
George_Thompson
Esri Frequent Contributor

I am adding some more groups for more visibility....

PythonDevelopersGeodatabase

If this is a show stopper, I would recommend login a case with Technical Support also to possible get to a resolution more quickly.

-George

--- George T.