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

Attachment

  • Summary
  • Discussion
  • Properties
  • Code sample

Summary

The Attachment object provides access to the attachments associated with the job.

Discussion

A document representing information related to the job can be associated with the job as an attachment. Examples of attachments include the following:

  • Word documents of instructions
  • Proposals for work
  • Scanned maps for digitizing
  • TIFFs to georeference
  • Web URL for the external help system

Properties

PropertyExplanationData Type
ID
(Read Only)

The ID of the job attachment.

Integer
name
(Read Only)

The visible name of the job attachment displayed in an application.

String
type
(Read Only)

The storage type of the attachment.

  • EMBEDDED —The file is stored in the Workflow Manager (Classic) database.
  • LINKED —The link to the file path is stored in the Workflow Manager (Classic) database.
  • URL —The URL link is stored in the database.
String

Code sample

The following script creates a job and adds a linked file attachment. It also gets a list of all linked file attachments associated with the job.

import arcpy
import arcpywmx

# Establish a connection to a Workflow database
conn = arcpywmx.Connect(r'c:\test\Workflow.jtc')

# Create a Workflow Job of Data Edits job type
job = conn.createtJob(job_type_name="Data Edits")

# Add a linked file attachment
job.addAttachment('LINKED', r'c:\test\Requirements.doc')

# Access a Workflow Job 
job1 = conn.getJob(99999)

# Get the list attachments associated with the job
attachments = job1.getAttachments()

# Print the names of Linked file attachments associated with the job
for attach in attachments:
     if attach.type == 'Linked':
         print(attach.name)

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