This file contains 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, os | |
fc = os.path.join(r"path",r"to",r"your",r"featureclass") | |
field_list = [[field.name,field.type,str(field.length)] for field in arcpy.ListFields(fc)] | |
for field in field_list: | |
print(','.join(field)) | |
This file contains 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 permanent_join(target_table, target_attribute, source_table, source_attribute, attribute_to_attach, rename_attribute=None): | |
""" | |
Attaches a field to a dataset in place in ArcGIS - instead of the alternative of doing an actual join and then saving out a new dataset | |
Only works as a one to one join. | |
:param target_table: the table to attach the joined attribute to | |
:param target_attribute: the attribute in the table to base the join on | |
:param source_table: the table containing the attribute to join | |
:param source_attribute: the attribute in table2 to base the join on |