Last active
February 17, 2017 04:58
-
-
Save M-Bryant/92d4f9a9eaad493ebe7dbc2bf61e0603 to your computer and use it in GitHub Desktop.
arcpy: list joined tables
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import arcpy | |
| def list_join_tables(in_table): | |
| """Returns a list of tables currently joined to a table or feature class. | |
| List includes the in_table | |
| Returns empty list if no joins | |
| """ | |
| fields = [f.name for f in arcpy.Describe(in_table).fields] | |
| return = list(set([f.split(".")[0] for f in fields if "." in f])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment