Software Developer's Kit - ChemDraw

Send comments on this topic
Delete Method
See Also 

Description

Member of ChemDraw Control.Bond.

Deletes this bond.

Syntax

Visual Basic
Public Sub Delete() 

Return Type

None

Remarks

When a bond is deleted, the atoms at the end of the bonds remain in the picture.

Example

'Declares variable vObject
 Dim vObject As ChemDrawControl10Ctl.Object
'Checks that there is an object loaded in the variable
 If  Selection.Objects.Count < 1 Then
     Exit Sub
 End If
'To delete the selected object
 
Private sub cmdDelete_Click()
     vMessage = MsgBox("Are you sure you want to delete the selected object?", _
                vbQuestion + vbOKCancel, "Confirm")

     If  vMessage = 1 Then
         vObject.Delete 
     End If
 End Sub

See Also