Browse for Python files


PurposeThis sample code demonstrates how to create a custom object filter in ArcCatalog and use it through a custom command to select a Python file (*.py).

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Start Visual Studio and build the solution.
  2. Start ArcCatalog.
  3. Click the Customize menu and select Add-In manager.
  4. On the Add-Ins tab, there should be CustomGxFilterVBNET or CustomGxFilter_CS. If not, click Customize, Command tab, then click Add from File.
  5. Navigate to the location of the built solution (that is, CustomGxFilterVBNET.esriAddIn or CustomGxFilter_CS.esriAddIn).
  6. Install the add-in.
  7. On the Commands tab, under Categories, make sure Add-In Controls is highlighted.
  8. Select and drag the button to the existing ArcCatalog toolbar.

CustomCommand.cs Command code for browsing for a file based on the custom filter.
CustomFilter.cs Class implements IGxObjectFilter for filtering Python files.
Config.esriaddinx Add-in's declarations.
Config.Designer.cs Auto generated.
Download the C# files
CustomCommand.vb Command code for browsing for a file based on the custom filter.
CustomFilter.vb Class implements IGxObjectFilter for filtering Python files.
Config.esriaddinx Add-in's declarations.
Config.Designer.vb Auto generated.
Download the VB.NET files

Download the files for all languages




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced