ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

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
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

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

Disable Attachments

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

Summary

Disables attachments on a geodatabase feature class or table. Deletes the attachment relationship class and attachment table.

  • Learn more about geodatabase attachments
  • Learn more about working with the Attachments geoprocessing tools

Usage

  • This tool permanently deletes all attachments internally stored in the geodatabase and associated with the Input Dataset. If attachments are enabled after being disabled, no attachments that were previously associated with the feature class or table will be present.

  • If the geodatabase feature class or table does not have attachments enabled, a warning message will be delivered and no processing will take place.

Syntax

DisableAttachments_management (in_dataset)
ParameterExplanationData Type
in_dataset

Geodatabase table or feature class for which attachments will be disabled. The input must be in a version 10 or later geodatabase.

Table View

Code sample

DisableAttachments example (Python window)

The following code snippet illustrates how to use the DisableAttachments tool in the Python window.

import arcpy
arcpy.DisableAttachments_management(r"C:\Data\City.gdb\Parcels")
DisableAttachments example (stand-alone Python script)

The following script illustrates how to use the DisableAttachments tool in a stand-alone script.

# Name: DisableAttachments_Example.py
# Description: GDB Attachments are no longer required, so disable
#              attachments on the input dataset

# Import system modules
import arcpy

# Set the geoprocessing workspace to the feature dataset LandRecord
# in the geodatabase City.gdb
arcpy.env.workspace = r"C:\Data\City.gdb\LandRecord"

# Set local variables
input = "Parcels"

# Use DisableAttachments to delete all attachment files from the gdb
# and disable attachment handling
arcpy.DisableAttachments_management(input)

Environments

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Attachments toolset
  • Working with the Attachments geoprocessing tools

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal