This project is read-only.

Make copy of shape in shapefile

Jul 27, 2011 at 9:01 PM

I have a map of the U.S..  I would like to be able to select individual states programmatically and make a copy of the shape for display in another area of the form.  Is this possible and how?

Aug 5, 2011 at 12:21 AM

What do you mean exactly by copy the shape and display it in another area of the form?  You should be able to insert the shape into another shapefile.  If the projections don't match though, the shape will be located in BFE.  Otherwise, you could serialize it to a string and manipulate the data in this fashion and than use CreateFromString(shpStr).  If you want to loop through the points in the shape class to copy I think you will be out of luck though because I don't think there is a way determine what part a point belongs to.  I may be wrong though, I am no expert.