Software Developer's Kit - ChemDraw

Send comments on this topic
OtherAtom Method
See Also 
thisAtom
[in] Atom attached to the bond.

Description

Member of ChemDraw Control.Bond

Returns the atom attached to the bond that isn't the specified atom

Syntax

Visual Basic
Public Function OtherAtom( _
   ByVal thisAtom As Atom _
) As Atom

Parameters

thisAtom
[in] Atom attached to the bond.

Return Type

Remarks

This function returns the atom attached to this bond that isn't the specified atom.

Example

'Returns the Other Atom attached to this bond
 Dim myBond As ChemDrawControl10Ctl.Bond
 Dim initializing As Boolean
'Use the OtherAtom method to return the other atom attached to the bond  (non specified atom)
 Dim myAtom As ChemDrawControl10Ctl.Atom
 Dim vAtom As ChemDrawControl10Ctl.Atom
 myAtom = myBond.OtherAtom(vAtom)

'Sets the Bond in the ChemDraw application using SelectionChanged event
 Private Sub ChemDrawCtl1_SelectionChanged(ByVal selection As ChemDrawControl10Ctl.IChemDrawSelection)
     If  selection.Bonds.Count = 1 Then
         Set myBond = ChemDrawCtl1.ActiveDocument.selection.Bonds.Item(1)
     End If
 End Sub

See Also