Software Developer's Kit - ChemDraw

Send comments on this topic
MakeBond Method
See Also 
at1
This refers to the atom at the first end of the bond
at2
This refers to the atom at the second end of the bond

Description

Member of ChemDraw Control.Cell.

Creates a new bond in this cell

Syntax

Visual Basic
Public Function MakeBond( _
   ByVal at1 As Atom, _
   ByVal at2 As Atom _
) As Bond

Parameters

at1
This refers to the atom at the first end of the bond
at2
This refers to the atom at the second end of the bond

Return Type

Example

'Declares variables
 Dim myTable As ChemDrawControl11Ctl.Table
 Set myCell = ctlChemDraw.Selection.Objects.Cell

 Private Sub cmdCommand_Click()
    'Checks that there is a Table loaded in the variable
     If  Selection.Tables.Count < 1 Then
         Exit Sub
     End If
     Set myCell = myTable.Cells.Item(1) 
    'creates an object within the cell
     
Set MyBond = myCell.MakeBond(myAtom1, myAtom2)
     myBond.selected = True 
     ctlChemDraw.Zoom 1000
 End Sub

See Also