Python Handling Related Features

1700
5
Jump to solution
03-01-2016 11:48 AM
benberman
Occasional Contributor

Hi everyone,

I have a polygon feature class of boundaries representing a one-to-many relationship of tabular records. In ArcMap, I'm able to create a map relate through clicking on Joins & Relates > Relate and then setting up the linking data structures and fields by following the dialogue box. Once this step is completed, then I am able to select all records in the table and then successfully relate them back to the feature class.

I'm trying to find a method to replicate this process in a python script but so far I haven't been able to find any documentation of how this could be accomplished. Any input would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
JoshuaBixby
MVP Esteemed Contributor

Can you elaborate a bit more about why you are trying to script relates with Python?  I view Relates as GUI sugar to make working with 1-to-many relationships more palatable in ArcMap, i.e., they work best when working with the GUI, but there is usually a better way to do it when scripting.

View solution in original post

0 Kudos
5 Replies
DanPatterson_Retired
MVP Esteemed Contributor

do you mean to access the code via python?

Join Field—Help | ArcGIS for Desktop

BlakeTerhune
MVP Regular Contributor

Do you actually have a relationship class that you're updating in an edit session or is it just an on-the-fly relate done in that map document?

Deciding between relationship classes, relates, and joins—Help | ArcGIS for Desktop

JoshuaBixby
MVP Esteemed Contributor

Can you elaborate a bit more about why you are trying to script relates with Python?  I view Relates as GUI sugar to make working with 1-to-many relationships more palatable in ArcMap, i.e., they work best when working with the GUI, but there is usually a better way to do it when scripting.

View solution in original post

0 Kudos
JoshuaBixby
MVP Esteemed Contributor

If one is interested in creating a Relate (using one is a different matter) with ArcPy, that functionality is available in ArcGIS Pro but not ArcMap:  Add Relate.

WesMiller
Regular Contributor III

If your data is stored in a geodatabase you may find Make Query Table—Help | ArcGIS for Desktop a useful option.

0 Kudos