Good dayI am having multiple layers (features) and I trying to standardize their attribute table. I am currently looking for a process or script that one could use to design a stand-alone attribute table "fields" within the Arc Toolbox. Meaning this tool I can add to my model and create standard fields within the attribute table. Could you please assistRegards
Tsamaelo
I don't know of an existing tool you can use to make it less verbose, however it's still pretty simple copy paste stuff. Something like
#your fc in_table = arcpy.GetParameter(0) #for each field field_name1 = arcpy.getParameterAsText(1) field_length1 = int(arcpy.getParameterAsText(2)) arcpy.management.AddField(in_table, field_name1, field_type, {field_precision}, {field_scale}, {field_length1}, {field_alias}, {field_is_nullable}, {field_is_required}, {field_domain}) field_name2 = arcpy.getParameterAsText(3) field_length2 = int(arcpy.getParameterAsText(4)) arcpy.management.AddField(in_table, field_name2, field_type, {field_precision}, {field_scale}, {field_length2}, {field_alias}, {field_is_nullable}, {field_is_required}, {field_domain})
Thanks David. Reading through the info on the link you've sent, it's only given me an option to add individual fields. Please see the example below of what I would like to create.
https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-field.htm
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.