How do I load saved relates in ModelBuilder?

629
5
10-24-2017 06:47 AM
MarjorieSinclair
New Contributor

I'm trying to automate extracting data from a geodatabase using ModelBuilder (ArcMap 10.3). I have a set of saved relates and can't find how to connect them.

0 Kudos
5 Replies
curtvprice
MVP Esteemed Contributor

I don't know what you mean by a saved relate. The only way you can save a relate is to save a layer file with a relate set up. Are you talking about geodatabase relationship classes? The only way to set them up in a new copy of a geodatabase is to recreate them using the Create Relationship Class tool.

MarjorieSinclair
New Contributor

I have a better grasp of the vocabulary today than I did 6 weeks ago.
I have a geodatabase containing shapefiles and relationship classes. Within ArcMap, I load the saved relationship classes and extract related data. I'm trying to automate the process in Model Builder (or Python) and can't find a tutorial on how to use a relationship class once it's been created.

0 Kudos
curtvprice
MVP Esteemed Contributor

Relationship classes are really more for interactive use while editing and working with tables, though they can enforce referential integrity when modifying data using MB or scripting. Here's a little tutorial on how they are used in the help:

Exploring the related objects of an object in a table—Help | ArcGIS Desktop 

In scripting and MB you need to do your select-by-joining operations using Add Join (or if you are into that (Dan Patterson‌) using Python dictionaries. Relationship classes are not accessible for use through geoprocessing (as far as I know).

0 Kudos
DuncanHornby
MVP Notable Contributor

You should check out this blog for relate like operations in model builder.