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

Maintain Attachments (Environment setting)

  • Usage notes
  • Dialog syntax
  • Scripting syntax

Tools that honor the Maintain Attachments environment will copy attachments from the input features to the output features. An attachment table and a relationship class will be created.

Usage notes

  • The input feature class must have attachments. This setting will not otherwise create or enable attachments on the output.
  • The output workspace must support attachments. Attachments will not be copied if the output workspace does not support attachments; for example, shapefiles and DBF files do not support attachments.
  • The following tools will transfer attachments:
    • Append
    • Copy
    • Copy Features
    • Copy Rows
    • Feature Class To Feature Class
    • Table To Table
    • Merge
  • The Copy tool will always copy attachments, regardless of the Maintain Attachments environment setting.

  • Since relationship classes are used to maintain the linkage, and relationship classes require an ArcGIS Desktop Standard or ArcGIS Desktop Advanced license, a Desktop Standard or Desktop Advanced license is required to maintain attachments when copying features. With ArcGIS Desktop Basic, you can read and open attachments.

Dialog syntax

  • Checked—Attachments will be copied to the output feature class. This is the default.
  • Unchecked—Attachments will not be copied to the output.

Scripting syntax

arcpy.env.maintainAttachments = True

ParameterExplanation

boolean_option

Specifies whether attachments will be copied to the output features. The default is True.

maintainAttachments syntax

Script example

import arcpy

# Set the maintainAttachments environment to False (no attachment copy)
arcpy.env.maintainAttachments = False

Related topics

  • Enabling attachments
  • Enable Attachments
  • Viewing attachments
  • What is a geoprocessing environment setting?
  • Setting geoprocessing environments

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