Select to view content in your preferred language

python and merge in editor toolbar

2246
3
06-06-2012 08:54 AM
JeromyBarnes
Emerging Contributor
I am trying to automate some processes for field our field crews.  In part of their process they use the merge tool while in an edit session to merge multiple line segments(gps lines) into one geometry.  Is there anyway to access the editor toolbar function with python or arcpy.  I have attached a copy of my code so far.
Tags (2)
0 Kudos
3 Replies
curtvprice
MVP Alum
Is there anyway to access the editor toolbar function with python or arcpy.


No, you can't - you also cannot use the ArcObjects code the editor toolbar accesses either without using .NET development languages like C# or VB.NET.

Instead,  you need to implement your task using standard (or your own) geoprocessing tools, for example Merge_management.
0 Kudos
JeromyBarnes
Emerging Contributor
Do you know of any other way to take all the rows in the attribute table and merge them into one row.  I think I can do this in plsql but i would like to keep this all in python.
0 Kudos
curtvprice
MVP Alum
Do you know of any other way to take all the rows in the attribute table and merge them into one row.  I think I can do this in plsql but i would like to keep this all in python.


Try the Dissolve tool. This will create a new feature class from just the selected features, but then you could immediately use SelectLayerByAttribute with SWITCH_SELECTION and CopyFeatures to a new feature class, and then append your Dissolve output to that new feature class.
0 Kudos