Software Developer's Kit - ChemDraw

Send comments on this topic
AttachedAtoms Property
See Also 

Description

Member of ChemDraw Controll.Atom.

Returns the collection of attached atoms, for multi-center atoms and variable attachment points. 

Property type

Read-only property

Syntax

Visual Basic
Public Property AttachedAtoms() As Atoms

Return Type

Remarks

This property refers to the collection of atoms attached to one atom. 

myAtom.AttachedAtoms.Application  returns the application of the collection
myAtom.AttachedAtoms.Count         returns the number of atoms in the collection
myAtom.AttachedAtoms.Item(1)      returns a given element of the collection
myAtom.AttachedAtoms.Parent        returns the parent of the collection

Numbered attachment points allow you to specify precisely how the structure fragments are connected to your parent structure.

Example

'Declares variable vAtom
 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
 Private Sub cmdAttachedAtoms_Click()
    'Item property points to one atom, thus all atom properties are enables

     Text1.text = MyAtom.AttachedAtoms.Item(1).ElementNumber
     Text2.text = MyAtom.AttachedAtoms.Item(1).LabelText 
 End Sub 

See Also