Hello everyone
I’m trying to made Undo Function.
So i’m looking for the way to remove point shape on a map.
Is there any reference for me??
Hello @james
If you’re doing operations manually, for example, using EditAddShape
to add the shape, then in your Undo operation, you can use EditDeleteShape
to remove the shape, passing in the shapeIndex
that was returned from EditAddShape
.
If instead you use the built-in shape editing tools, there is already a built-in Undo/Redo stack that you can use.
Regards,
Jerry.
Thank You Jerry.
I used shp.DeletePoint(index) to remove Point SHP. And it works.
Please let me ask you one more thing.
I used DrawLineEX to connect two Point SHPs.
How can i do to erase this Line?
Hello @james
Using the Drawing layer, the only way to remove shapes is to clear the entire layer. You would have to keep track of things if you wanted, for instance, to keep your two points - you would have to put them back.
Here are the Drawing Layer options.
If you create an in-memory Shapefile, and add it as a map layer, you have much more control over individual shapes.
Regards,
Jerry.