Using AML with script tools
This topic applies to ArcGIS for Desktop Advanced only.
It's possible to use ARC Macro Language (AML) files in ArcGIS for Desktop by creating a new geoprocessing script tool. If you have an ArcGIS for Desktop Advanced license and ArcInfo Workstation installed, you can add a custom script tool that references an AML.
There is an initial step that must be completed before an AML file can be set up as a script tool. The system must be able to open ArcInfo Workstation and run the &run command, such as arc: &run MyAml.aml. Esri provides a tool for updating the system registry. After the system registry has been updated, add a new script tool using the Add Script Tool dialog wizard. The script tool can be used like any other geoprocessing tool.
Any limitations in ArcInfo Workstation or Workstation modules, such as GRID or TIN, will still be present when running an AML file as a script tool.
-
Update the system registry:
- Browse to ArcToolbox\Scripts subfolder under your ArcGIS install.
- Double-click the file RegisterAmlAsExecutable.reg.
- Click Yes to add this information to the registry.
-
Create a script tool that runs an AML file:
- From within ArcGIS, right-click a folder or geodatabase and click New > Toolbox.
- Right-click the toolbox created in the previous step, click Add > Script. This starts the Add Script wizard.
- Name and describe the new script tool and click Next.
- Browse to the location of the AML file and click Next.
- Set up the input and output parameters and options and click Finish.
AML files that are run as script tools must begin with an Arc: prompt command. It is possible to run commands from other prompts within ArcInfo Workstation, such as GRID, TABLES, ArcPlot, ArcEdit, and so on, but the AML file must start at the Arc: prompt. For example, if the AML file only runs in GRID, be sure to add a line in the AML file that starts GRID before running the rest of the program.