Select to view content in your preferred language

arcpy.Describe(relationshipclass) doesn't include key fields.

3459
10
05-19-2011 09:38 PM
MichaelAdornetto
Deactivated User
I'm attempting to write a script to read the relationship classes from one geodatabase to another.  These tables have identical feature and object classes.

I should be able to select the relationshipclass in the source, use arcpy.Describe on them and get the parameter I'll need to perform an arcpy.createRelationshipClass_management.  Except the describe does not give me any access Primary / Foreign key information according to the documentation.  Is there away to get these field names because without it I can't recreate the relationship class.
Tags (2)
0 Kudos
10 Replies
ChrisDiMeo
Deactivated User

Hi -

Bumping this thread with a related question.

I'm trying to automate creating relationship classes in python (ArcGIS 10.2.1).  I am able to get most of the information I need via the Describe call as shown in previous posts.  I'd like to get the properties of existing RC's and automate recreating them using the original properties (copy/paste of data not an option).

My issue is that I'm not able to return the Relationship Rules (eg. desc.relationshipRules) as decribed here:

RelationshipClass properties—Help | ArcGIS for Desktop 

The documentation is at 10.3 and I am working at 10.2

You can see below that I'm able to return all the properties available for this particular rel class except the Relationship Rules, which, I know exist (also see below).

Has anyone tried to return these relationship rules?  Tried to recreate via python?  Any success?

Thanks,

Chris

0 Kudos