Software Developer's Kit - ChemDraw

Send comments on this topic
Count Property
See Also 

Description

Member of ChemDraw Control.Atoms

Returns the number of atoms in the atoms collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Count() As Long

Return Type

Long

Remarks

Returns the number of atoms in a collection of atoms.

Example

'Declares variables 
 Dim myAtoms As ChemDrawControl11Ctl.Atoms
 Set myAtoms = ctlChemDraw.Selection.Objects.Atoms

 Private Sub cmdAtoms_Click()
    'returns the application of the atoms collection
     Text1.text = MyAtoms.Application
    'returns the number of atoms in the atoms collection
     Text2.text = MyAtoms.Count 
    'sets the Item(1) of the atoms collection 
     myAtoms.Item(1).ElementNumber = 26
    'returns element number of Item(1)of the atoms collection 
     Text3.text = MyAtoms.Item(1).ElementNumber
 End Sub

See Also