Copying Features WITH Attributes

822
5
Jump to solution
06-25-2012 09:51 AM
ZacharyTheberge
New Contributor
I am trying to copy features from one shape file to another, while also transferring the attributes (in the attributes table) as well. I can copy/paste the features using the editor tool to get the features on the map, but the attribute table is pretty much empty.

I'm only looking for copying some of the features from one layer to another, and am befuddled on how to get the data too.

Thanks a bunch!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Notable Contributor
Like John said, you'll need to make sure that the fields match exactly.  What you should do is create a new file geodatabase and a new feature class in the file geodatabase.  Within the wizard to create the new feature class, you'll get to the window to manage fields, as well as the option to import fields in the same window.  Import the fields from the old shapefile, then you have two options:

1)  You can either go into an edit session on the new feature class, select features you want to copy, and copy and paste them into the new feature class.

2)  Run the append using the old shapefile and new feature class as inputs, (the new feature class will be your target).  This will append all records from the old shapefile to the new one.

In both workflows, since the fields of both datasets are identical, the values of the records will be populated with the corresponding values.

View solution in original post

0 Kudos
5 Replies
JonathanQuinn
Esri Notable Contributor
You can use the Append tool to append features from a certain dataset into a target dataset.  If features are selected in the input dataset, only those features will be appended, (or copied), into the target dataset.
0 Kudos
JohnSobetzer
Frequent Contributor
To get attributes to come over with the shapes in a copy and paste, there must be an exact match of the field names in the copied from and pasted into layers.   Different field types or lengths can also be a problem.  If you don't have a good match you will have to add fields with those exact names to the layer to be copied, use the calculator to fill them from your existing fields, and then copy and paste.  Alternately, if you don't mind creating a new layer with the fields of both layers in it you can use the merge tool on selected records.
0 Kudos
ZacharyTheberge
New Contributor
Thanks Jon. But I seem to still be having trouble. When I use the append tool, it makes a copy of of the selected points into the new shape file, but the attribute table is only made up of two columns, FID and Shape* (point). I'm looking to transfer all of the attributes from the input (around thirty columns of info) into the new shape file.
0 Kudos
JonathanQuinn
Esri Notable Contributor
Like John said, you'll need to make sure that the fields match exactly.  What you should do is create a new file geodatabase and a new feature class in the file geodatabase.  Within the wizard to create the new feature class, you'll get to the window to manage fields, as well as the option to import fields in the same window.  Import the fields from the old shapefile, then you have two options:

1)  You can either go into an edit session on the new feature class, select features you want to copy, and copy and paste them into the new feature class.

2)  Run the append using the old shapefile and new feature class as inputs, (the new feature class will be your target).  This will append all records from the old shapefile to the new one.

In both workflows, since the fields of both datasets are identical, the values of the records will be populated with the corresponding values.
0 Kudos
ZacharyTheberge
New Contributor
Thanks guys, got it to work. I first re-entered the fields exactly by hand...took foreverrrr... but on the next go I used geodatabase and created it that way. Good solutions.
0 Kudos