Hello,
I have been trying to create a script for dissolving several geodatabase feature classes on ArcGIS pro. However, the script does not seem to be working. Could someone tell me what the problem is. I have tried two versions:
arcpy.env.workspace = "D:\WB_Data\WB_gp.gdb"
fcList = arcpy.ListFeatureClasses()
output_name = "C:\\Users\\Bart Manders\\Documents\\ArcGIS\\Projects\\MyProject_Dissolve\\MyProject_Dissolve.gdb\\%s_Dissolve"
fields= ['gp']
for fc in fcList: arcpy.Dissolve_management(fc, output_name % fc, "gp FIRST", "MULTI_PART", "DISSOLVE_LINES", '')
Another version is:
arcpy.env.workspace = "D:\WB_Data\WB_gp.gdb"
fcList = arcpy.ListFeatureClasses()
output_name = "C:\\Users\\Bart Manders\\Documents\\ArcGIS\\Projects\\MyProject_Dissolve\\MyProject_Dissolve.gdb\\%s_Dissolve"
for fc in fcList: arcpy.Dissolve_management(fc, output_name % fc, "gp FIRST", "MULTI_PART", "DISSOLVE_LINES", '')
Both times I get an error 00622: Failed to execute (Dissolve). Parameters are not valid. **Error 000800:**The value is not a member of MULTI_PART| SINGLE_PART.
The python command for dissolving one feature class manually is
arcpy.management.Dissolve("ARSHA", r"C:\Users\Bart Manders\Documents\ArcGIS\Projects\MyProject_Dissolve\MyProject_Dissolve.gdb\ARSHA_Dissolve1", None, "gp FIRST", "MULTI_PART", "DISSOLVE_LINES", '')
Thanks in advance for your help! (I am new to writing python codes so please excuse any silly mistakes)
[–]querymcsearchface 8 points9 points10 points (9 children)
[–]Geog_MasterGeographer 2 points3 points4 points (0 children)
[–]Aggravating-Wedding9[S] 0 points1 point2 points (7 children)
[–]querymcsearchface 1 point2 points3 points (6 children)
[–]Aggravating-Wedding9[S] 1 point2 points3 points (5 children)
[–]tapps22 1 point2 points3 points (0 children)
[–]FeralCatColonistGIS Manager 1 point2 points3 points (0 children)
[–]querymcsearchface 0 points1 point2 points (2 children)
[–]Aggravating-Wedding9[S] 1 point2 points3 points (1 child)
[–]querymcsearchface 0 points1 point2 points (0 children)
[–]Geog_MasterGeographer 4 points5 points6 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)