Wednesday, April 4, 2012

Adding Python Extensions to ArcCatalog File Types

When writing complex python processes, sometimes you do not want to put all the logic in a single python file.  This means if you need to make an edit during testing from ArcCatalog, you will have to have file explorer open and switch between screens.

As a programmer, this is unacceptable, so make life easier and add the PY extensions as a viewable file extension in ArcCatalog.
  1. To do this, bring up ArcCatalog and select Customize from the menu bar.
  2. Next, select 'ArcCatalog Options'
  3. Click on the 'File Types' tab
  4. For Standard Installations:
    • If you did a standard installation, the computer should already have python installed, so click on 'Import File Type From Registry'
    • Select the PY extension in the list
  5. For Non-Standard Installations, or Step 4 does not work:
    • For 'File Extension' type PY
    • 'Description Type' - Python File
    • Set the icon to: C:\Python26\ArcGIS10.0\DLLs\py.ic
  6. Press OK to save your changes
  7. Press Apply then OK one more time
  8. Now you can see your python files in ArcCatalog
Enjoy