Software Developer's Kit - ChemDraw

Send comments on this topic
Atom2 Property
See Also 

Description

Member of ChemDraw Control.Bond.

Returns the atom at the second end of this bond.

Property type

Read-only property

Syntax

Visual Basic
Public Property Atom2() As Atom

Return Type

Remarks

This function returns the atom at the second end of the bond.

Example

'In the form general section (or as public in the module)
 Dim myBond As ChemDrawControl10Ctl.Bond
'---------------------------------------------------------------------------------
 Private Sub ctlChemDraw_SelectionChanged(ByVal selection As _ 
         ChemDrawControl10Ctl.IChemDrawSelection)  
     'Checks that there is a bond loaded in the variable 
     If  Selection.Bonds.Count < 1 Then 
         Exit Sub
     End If 
 End Sub
'---------------------------------------------------------------------------------
 Private Sub Command1_Click()
     Text1.Text = myBond.Atom2.ID 'Enables all atom properties 
     Text2.Text = myBond.Atom2.AtomNumber 'all atom properties are enabled
 End Sub

See Also