Software Developer's Kit - ChemDraw

Send comments on this topic
AddMappedAtom Method
See Also 
[in] Adds this atom to the collection of mapped atoms.


Member of ChemDraw Control.Atom

Adds an atom to the collection of mapped atoms, for atom-atom mapping in reactions 


Visual Basic
Public Sub AddMappedAtom( _
   ByVal pVal As Atom _


[in] Adds this atom to the collection of mapped atoms.

Return Type



You can create correspondences between atoms in different structures to use in the creation of queries to search a reaction database. You can assign atom mapping in two ways:

  • Automatic mapping
  • Manual mapping  

      See mapped atoms.

    • Example

      'Declares variables
       Dim myAtom As ChemDrawControl10Ctl.Atom

       Private Sub ctlChemDraw_SelectionChanged(ByVal selection As _
          'Checks that there is an atom loaded in the variable
           If  Selection.Atoms.Count < 1 Then
               Exit Sub
           End If
       End Sub

      'Adds a mapped atom 
       Private sub cmdAddMappedAtom_click()
          'Verifies if there is a secondary atom chosen
           If  MyAtom.LabelText = "Secondary" Then
               vMessage = MsgBox("Cannot be mapped to itself, please select another", vbCritical _
                          + vbOKOnly, "Error") 

               Exit Sub
           End If
           MyAtom.AddMappedAtom vAuxAtom 
          'Returns the number of atoms mapped together
           Text1.Text = MyAtom.MappedAtoms.Count

       End Sub

      See Also