Software Developer's Kit - ChemDraw

Send comments on this topic
DeleteMapping Method
See Also 

Description

Member of ChemDraw Control.Atom

Removes this atom from the collection of mapped atoms, for atom-atom mapping in reactions 

Syntax

Visual Basic
Public Sub DeleteMapping() 

Return Type

None

Remarks

The correspondences between atoms in different structures, used to create queries, can be deleted using this method.

Example

'Declares variables
 Dim vAtom  As ChemDrawControl10Ctl.Atom
 Dim myAtom As ChemDrawControl10Ctl.Atom
'Checks that there is an atom loaded in the variable
 If  Selection.Atoms.Count < 1 Then
     Exit Sub
 End If

'Deletes mapping
 Private sub cmdDeleteMapping_click()
    ´Deletes all the atoms attached to the selected atom 
     myAtom.DeleteMapping vAtom
     vMessage = MsgBox("Are you sure you want to DeleteMapping of the selected Atom?", _
                vbQuestion + vbOKCancel, "Confirm")
     If  vMessage = 1 Then
         MyAtom.DeleteMapping
         cmdLoad.Visible = False
     End If
     lblMappedAtoms.Caption = "0"
 End Sub

See Also