@ Blah238 önerisine göre, bu python kodu bir Coğrafi Veritabanı içindeki tüm ilişki sınıflarını listeler ve bunları benzersiz bir listeye (relClasses) yerleştirir:
inGDB = r"D:\mygeodatabase.gdb"
env.workspace = inGDB
#################Getting all Tables and Feature Classes###########
fcs = []
#root of workspace
for item in arcpy.ListFeatureClasses("*"): fcs.append(item)
for item in arcpy.ListTables("*"): fcs.append(item)
fds = arcpy.ListDatasets("*","Feature")
for fd in fds:
env.workspace = inGDB +'\\'+fd
for fc in arcpy.ListFeatureClasses("*"):
fcs.append(fd+'/'+fc)
for tb in arcpy.ListTables("*"):
fcs.append(fd+'/'+tb)
env.workspace = inGDB
relClasses = set()
for i,fc in enumerate(fcs):
desc = arcpy.Describe(fc)
for j,rel in enumerate(desc.relationshipClassNames):
relDesc = arcpy.Describe(rel)
if relDesc.isAttachmentRelationship:
continue
relClasses.add(rel)
print relClasses