Select to view content in your preferred language

Python code to merge attribute rows

1629
3
12-07-2010 09:55 PM
RoryHall
New Contributor III
Hi all,
I am writing a standalone Python application and I need to merge rows of attributes into one only attribute.

thanks ~ Rory
0 Kudos
3 Replies
DuncanHornby
MVP Notable Contributor
Rory,

Take a look at the desktop help file! It has hundreds of examples of how to script the geoprocessing tools in Python. Depending upon exactly what you want to do you may want to merge tables or append data to an existing table? Anyway search the help file for the Merge tool and at the bottom of the page there is always a short example of the tool being called using Python under the section Scripting syntax.

Duncan
0 Kudos
RoryHall
New Contributor III
Thanks Duncan,
I have checked the help files and merging two feature datasets is relatively straight forward, but I want to acheive in a tool or batch process the merging of attributes within the same dataset, as if you would in an editing session "merge command (Editor Toolbar)". Similar to dissolve, I guess, but I want to end up, if applicable to the case at hand, a multipart polygon, which may end up being made up of several to several hundred polygons, but the resulting polygon needs to only have a single row entry.

Rory
0 Kudos
JeromyBarnes
New Contributor II
Thanks Duncan,
I have checked the help files and merging two feature datasets is relatively straight forward, but I want to acheive in a tool or batch process the merging of attributes within the same dataset, as if you would in an editing session "merge command (Editor Toolbar)". Similar to dissolve, I guess, but I want to end up, if applicable to the case at hand, a multipart polygon, which may end up being made up of several to several hundred polygons, but the resulting polygon needs to only have a single row entry.

Rory




Did you ever resolve this issue. I have ran into the exact same thing.
0 Kudos