Share via


Cut method

Removes an object from the map and places it on the Clipboard.

Applies to

Objects:  DataSet, Pushpin, Shape, Waypoint

Syntax

object.Cut

Parameters

Part Description
object Required. An expression that returns an object from the Applies to list.

Remarks

To paste the contents of the Clipboard, use the Paste method on a Map or DataSet object.

Example

    Sub CutAndPastePushpin()

  Dim objApp As New MapPoint.Application   Dim objLoc As MapPoint.Location   Dim objPin As MapPoint.Pushpin
  'Set up application and get a location object   objApp.Visible = True   objApp.UserControl = True   Set objLoc = objApp.ActiveMap.GetLocation(0, 0)
  'Create a Pushpin and zoom to it   Set objPin = objApp.ActiveMap.AddPushpin(objLoc)   Set objApp.ActiveMap.Location = objPin.Location
  'Cut the Pushpin, then paste it back onto the map   objPin.Cut   objApp.ActiveMap.Paste
  End Sub