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.
Solved! Go to Solution.
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.
do you mean to access the code via python?
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
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.
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.
If your data is stored in a geodatabase you may find Make Query Table—Help | ArcGIS for Desktop a useful option.