Software Developer's Kit - ChemDraw

Send comments on this topic
ElementNumber Property
See Also 

Description

Member of ChemDraw Control.Atom.

Sets and returns the element number of the atom

Property type

Read-write property

Syntax

Visual Basic
Public Property ElementNumber() As Long

Return Type

Long

Remarks

This property indicates the element number of the atom. The default value is assumed to be that of the Carbon atom i.e. 6.

Example

'Declares variable vAtom
 Dim vAtom 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 cmdElementNumber_Click() 
    'Will show an atom of iron, which is element 26 in the periodic table  
     vAtom.ElementNumber = 26   
    'Reads the element number of the atom 
     Text1.text = vAtom.ElementNumber
 End Sub

See Also