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 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

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Generate Masks

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Generates annotation masks for symbolized feature layers based on an XML rule file.

Usage

  • The XML rule files can be found at C:\Program Files (x86)\ArcGIS\EsriDefenseMapping\<Install_Directory>\MGCP\Cartography\Symbology.

  • The XML files are based on product type and are named based on the product that is being run; for example, the MTM50 rule is named MTM_Anno_Masking_Rules.xml.

Syntax

arcpy.defense.GenerateMasks(in_mapdocument, in_file, out_dataset)
ParameterExplanationData Type
in_mapdocument

The input map document containing the symbolized layers.

ArcMap Document
in_file

The input XML file that contains rules for creating annotation masks.

File
out_dataset

The output dataset where the newly created mask features will be stored.

Feature Dataset

Code sample

GenerateMasks example (Python window)

The Python sample demonstrates how to generate annotation masks for symbolized feature layers based on an XML rule file.

from arcpy import defense

map_document = r'C:\Data\MTM50_TRD_4_3.mxd'
product_file = r'C:\Program Files (x86)\ArcGIS\EsriDefenseMapping\Desktop10.5\Mgcp\Cartography\Symbology\MTM_Anno_Masking_Rules.xml'
output_dataset = r'C:\Data\MTM50_TRD_4_3.gdb\MTM50_Anno_Masks'

defense.GenerateMasks(map_document, product_file, output_dataset)

Environments

  • Current Workspace

Licensing information

  • Basic: No
  • Standard: Requires Defense Mapping
  • Advanced: Requires Defense Mapping

Related topics

  • An overview of the Utilities toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

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