Getting join info with Arcpy

1104
1
07-02-2014 01:08 PM
MichaelHeavenor
New Contributor II
Has anyone been able to get join info from a layer using Arcpy without using ArcObjects?  I am trying to find the target table and field, the join table and field, and the join type.
Tags (2)
0 Kudos
1 Reply
ChrisPedrezuela
Occasional Contributor III
I think you can easily get the target and join layers like this,

inputLayer = r"...\testLayer.lyr"

targetLayerName = (arcpy.mapping.Layer(inputLayer)).name
fields = arcpy.ListFields(inputLayer)

lyrList = []
for item in fields:
    if ((item.name).split('.'))[0] not in lyrList:
        lyrList.append(((item.name).split('.'))[0])

for lyr in lyrList:
    if lyr != targetLayerName:
        print 'Join Layer: '+lyr


As for finding the join ID and type, no clue as well.

Cheers
0 Kudos