To solve this problem in version 10.1, this may be the alternative: Perform ArcObject code called for the creation of the connection file 1. Install comtypes library from http://sourceforge.net/projects/comtypes/ 2. Enable Python to use ArcObjects When working to get ArcObjects and Python working together in version 10.1, you'll also need to make some modifications to your comtypes installation. The full solution is abbreviated here: A. Navigate to your comtypes directory (ex. C:\Python\ArcGIS10.1\Lib\site-packages\comtypes) B. Delete the following files (note that the �??safearray�?� files are not preceded by an underscore): automation.pyc automation.pyo safearray.pyc safearray.pyo C. Open automation.py with a text editor and go to line 794 which is part of the �??ctype_to_vartype�?� dictionary. Add this line (including the comma): VT_BYREF|VT_BSTR, D. Delete everything from the �??gen�?� directory. E. Copy Snippets.py (module developed by Mark Cederholm) to C:\Python[version]\ArcGIS[version]\Lib Note: Taken from http://www.sspinnovations.com/blog/2014/02/04/useful-scripts-non-programmer-converting-vba-scripts-python 3. Implementing the Python code with the call Attachements: Snippets.py ArcObjects.py (CreateConnectionFile Phyton Implementation)
... View more