Hi I was wondering if anyone know a way to open "Related Tables" in ModelBuilder. There doesn't seem to be a tool that does this so if anyone has any code it would be really useful. All the relationship classes tools seem to be to create a relationship rather than view them.
The aim of this part of the model is to automate the process of finding what polygons of one layer are not related another layer. Manually I would do the following:
Open attribute table > Click Related Table > Click on the layer I would like to see the relates of > switch selection.
I hope this makes sense.
Your workflow of how you currently do it cannot be emulated using tools in arctoolbox which therefore limits your ability to do it in modelbuilder. Any functionality exposed in arcpy simply deals with updating existing elements within projects, for example http://pro.arcgis.com/en/pro-app/arcpy/mapping/arcgisproject-class.htm None of which applies to your workflow.
You could go back a step and use the Add Relate in your workflow, buy it is the switch selection that is the problem
Relates have always been an interactive workflow. However, I believe you can accomplish this workflow in Model Builder or Python as follows:
table1 - table you want to find no-matches in
table2 - table you are matching to
1) Add Join table1, join_table=table2. Use the same fields the relate uses.
2) Select Layer By Attribute, 'table2.<joinfield> IS NULL'
3) Remove Join (table2)
The records without a match should be selected.