HOW TO

Search for multiple file types with an input widget

Last Published: April 25, 2020

Procedure

Description:

How can a form menu input widget present a list of multiple file types? For example, how can I configure this widget to display all polygon coverages and ASCII files with the .txt extension?

Solution:

The [LISTFILE] and [FILELIST] functions can only search for one file type at a time. Since the results of a file search must be stored in a unique variable, multiple types can be handled via multiple variables that can be concatenated into one single variable for display. The example above can be solved as follows:

1) This aml searches for polygon coverages and text files:

&SETVAR polys = [LISTFILE * -COVER -POLY]
&SETVAR text = [LISTFILE *.txt -FILE]
&SETVAR .list = %polys%,%text% /* Concatenate results
&MENU choice

2) This menu displays the contents of the global variable defined in the aml:

7 choice.menu
%list1 %quit
%list1 INPUT .selection 20 TYPEIN NO SCROLL YES ROWS 5 ~
CHOICE %.list%
%quit BUTTON KEEP 'quit' &RETURN

Article ID:000001360

Software:
  • ArcMap 8 x
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic