ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Creating a Python script to perform cartographic tasks on aeronautical charts

ArcGIS for Aviation: Charting has several Python functions that can be grouped together to run several functions in succession. The Aviation Python Script Generator allows you to update cartographic features, apply visual specification rules, and create feature-linked annotation for several products at once. Scripting allows you to automate the same process on several products at once, making the workflow more efficient.

The Aviation Python Script Generator requires you to have a product library and production database set up so it can get the appropriate information for the data frames and map IDs. Each process is represented by a different part of the wizard and requires you to indicate which feature classes to process from the production database. This tool also allows you to build a dictionary of the MXDs, map IDs, and data frames that need to be referenced to run each process outlined in the script.

Although three processes are included in the script by default, you can choose to not run one or more of the processes.

  1. Start ArcMap.
  2. On the main menu, click Customize > Toolbars > Aviation Data Management.
  3. Click the Aviation Python Script Generator button Aviation Python Script Generator on the Aviation Data Management toolbar.

    The Aviation Python Script Generator dialog box appears. The paths to the product library and production database are displayed in the Product Library Path and Production Database Path fields, respectively. By default, all the processes are selected, but you can uncheck the check box next to the process you do not want to run.

    Aviation Python Script Generator wizard with the product library, production database, and processes
  4. Click Next.

    The Aviation Python Script Generator dialog box appears with the Derive Airspace Geometry section, if you selected this process.

    Aviation Python Script Generator wizard with the Derive Airspace Geometry section
  5. Optionally construct an SQL query to select a subset of features that need null geometry updated.

    For more information on SQL syntax, see the SQL reference for query expressions used in ArcGIS.

    If you are only creating a script for Derive Airspace Geometry, you can continue to step 26.

  6. Click Next.

    In this part of the wizard, you select which instances will have the processes run on them.

    Aviation Python Script Generator wizard with instances to process
  7. Expand the Instances to Process list and check the check boxes next to them.

    Check the Expand All check box to expand the entire tree view. You can also click Select All or Clear All to select or unselect all the instances at once, respectively.

  8. Click Next.

    The Aviation Python Script Generator dialog box appears with the Select Tool Preference section if you selected Create Airspace Areas or Create Airspace Lines.

    Aviation Python Script Generator wizard with the Select Tool Preference section
    Note:

    If the options in the drop-down menus are blank, you need to create preferences in the tool options in the aviation properties.

    For more information, see Creating airspace area preferences and Creating airspace lines preferences.

  9. Click the drop-down arrow next to the type of airspace you want to create and choose a preference.

    If you are finished with the setup for the processes you selected, you can continue to step 26.

  10. Click Next.

    The Aviation Python Script Generator dialog box appears with the setup for Carto Commander. In this part of the wizard, choose the feature classes that will have their cartographic features updated.

    If you are not going to run the Carto Commander process but will run Visual Specifications, Create Feature Linked Annotation, or Update Annotation, proceed to step 12.

    Aviation Python Script Generator with feature classes to process with Carto Commander
  11. Check the check boxes next to the feature classes for which you want to update the cartographic features.

    Click Select All or Clear All to select or unselect all the feature classes, respectively.

    If you are finished with the setup for the processes you selected, you can continue to step 26.

  12. Click Next.

    The Aviation Python Script Generator dialog box appears. In this part of the wizard, you are building a dictionary of the maps and data frames that will be processed if you selected either Visual Specifications, Create Feature Linked Annotation, or Update Annotation. The path to the MXD file is also required.

    Aviation Python Script Generator wizard with data frame and map ID pairings
  13. Click the Add Mxds button under the Mxd Path list.

    The Select MXDs dialog box appears.

  14. Browse to the MXDs to be processed by the script.
  15. Select the MXD files and click Open.

    After the MXDs have been opened and appear in the Mxd Path list, click Save to save the list as a text file. This allows you to use the Load button to load the list of MXD files the next time you want to generate a script on the same set of MXDs. Once they are loaded, use the Remove Mxd button to remove individual MXDs as necessary.

  16. Create a data frame and map ID pairing by doing the following:
    1. Click an MXD name in the Mxd Path list.

      The Data Frame Name list is populated with the names of the data frames in the MXD.

    2. Click the name of the data frame to be processed in the Data Frame Name list.
    3. Click the name of a map ID in the Select Map ID list.

      Note:

      Ensure that you only choose a map ID that corresponds with the data frame, or the pair will be incorrect and the script will not run.

    4. Click Form Data Frame/Map ID Pair.
    5. Repeat steps 16a through 16d for the remaining data frame and map ID pairs to be created.

      Note:

      Pairs must be created for all the Map IDs in the Select Map ID list, which is determined by what is selected on the Instances to Process tree view in a previous part of the wizard.

  17. Check the boxes next to the MXDs to be processed in the Data Frame/Map ID Pairs list.

    Click Select All or Clear All to select or unselect all the MXDs in the list. You can also check one of the check boxes and click Remove Selected Pair to remove the pair from the Data Frame/Map ID Pairs list.

  18. Click Next.

    The Aviation Python Script Generator dialog box appears if you selected Visual Specifications. In this part of the wizard, choose which visual specifications to apply and to which feature classes.

    If you are not going to run the Visual Specification process, proceed to step 22 for Create Feature Linked Annotation or to step 25 for Update Annotation.

    Aviation Python Script Generator wizard with feature classes to process with the Visual Specification process
  19. Click the Select Visual Specification drop-down arrow and choose the name of a specification.

    The Layers To Process list is populated with the cartographic feature classes where rules are applied.

  20. Check the check boxes next to the feature classes to process.

    Click Select All or Clear All to select or unselect all the feature classes in the list.

    If you are finished with the setup for the processes you selected, you can continue to step 26.

  21. If necessary, repeat steps 19 and 20 for the other specifications to be applied to the data.
  22. Click Next.

    The Aviation Python Script Generator dialog box appears. In this part of the wizard, choose feature classes that will have feature-linked annotation generated.

    Aviation Python Script Generator with annotation feature classes to process using the Create Feature Linked Annotation process
  23. Check the check boxes next to the names of the annotation feature classes to process in the Annotation Feature Classes To Process list.

    When the check box is checked, all the annotation classes are automatically selected. To only process specific annotation classes, expand the annotation feature class and uncheck the class you do not want to process.

    If you are finished with the setup for the processes you selected, you can continue to step 26.

  24. Click Next.

    The Aviation Python Script Generator dialog box appears with the setup for Update Annotation. In this part of the wizard, you choose feature classes that will have annotation updated.

    Aviation Python Script Generator with setup for the Update Annotation process
  25. Check the check boxes next to the names of the annotation feature classes to process in the Annotation Feature Classes To Process list.

    When the check box is checked, all the annotation classes are automatically selected. To only process specific annotation classes, expand the annotation feature class and uncheck the class you do not want to process.

  26. Click Summary.

    The Aviation Python Script Generator Summary dialog box appears with the complete script content based on the parameters you provided.

    Aviation Python Script Generator Summary with the content of the script
  27. Click the browse button next to the Output Location field and browse to a location where the script can be saved.
  28. Type a name for the script in the File name text box and click Save.
  29. Click Generate Python Script.

    The Python script is created and saved in the output location specified. The Aviation Python Script Generator message appears indicating whether the script was generated successfully.

  30. Do one of the following:
    • Click Yes to close the message and Aviation Python Script Generator wizard.
    • Click No or Cancel to leave the wizard open and make corrections as needed.

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2020 Esri. | Privacy | Legal