Is there a property for a feature class that shows if “Attachments” are enabled on that feature?

1522
2
07-30-2019 01:48 AM
AdrianGay
New Contributor II

 

Hi,

Am I missing something here is there a property for a feature class that shows if “Attachments” are enabled on that feature?

I have located the following properties but can find anything for attachments

 

datasetVersioned = arcpy.Describe(fc).isVersioned

inc.wriInfo('{0:<50} Feauture Class/Table - Versioned = {1}'.format(fc, datasetVersioned))

 

datasetArchived = arcpy.Describe(fc).IsArchived

inc.wriInfo('{0:<50} Feauture Class/Table - Archived = {1}'.format(fc, datasetArchived))

 

editorTrackingEnabled = arcpy.Describe(fc).editorTrackingEnabled

inc.wriInfo('{0:<50} Feauture Class/Table - Tracking = {1}'.format(fc, editorTrackingEnabled))

 

I am trying to report multiple Geo database schemas with varying objects in multiple Oracle SDE databases.

 

Can anyone tell me what is the best way to find out if objects have “Attachments” associated with it using ArcPy?

 

I could loop through all feature classes and see if there is an Attachment relationship class and an Attachment table but assume that there must be a better way then checking if there are Attachments enabled.   

 

Many thanks for any suggestions

Adrian

Tags (1)
0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

Adrian

I assume you are looking for something not on the list of functions or within the classes

Alphabetical list of ArcPy functions—ArcPy Functions | ArcGIS Desktop 

Alphabetical list of ArcPy classes—ArcPy classes | ArcGIS Desktop 

Haven't seen one

0 Kudos
AdrianGay
New Contributor II

Yes, you assume correctly... 

At the moment the only solution that I can see is to loop over the feature classes by name and then see if there is also a

SDE Relationship Class of the form [NAME]_ATTACHEREL and a 

SDE Table of the form [NAME]_ATTACH

But my assumption (which may be incorrect) is that there must be a better way from Esri to do this and to see if "Attachments" are enabled on an object.