Software Developer's Kit - ChemDraw

Send comments on this topic
AtomNumber Property
See Also 

Description

Member of ChemDraw Control.Atom.

Sets and returns the atom number of this atom.

Property type

Read-write property

Syntax

Visual Basic
Public Property AtomNumber() As String

Return Type

String

Remarks

ChemDraw is extremely flexible in what it allows for atom numbers: any string is valid, and this property is not limited to numeric values. 
For example, not only is "2" a valid atom number, but so are 2', 2a, b, and b'.

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 cmdAtomNumber_Click()
    'Sets a value
     myAtom.AtomNumber = "example string" 
    'Reads the value from Atom.AtomNumber
     Text1.text = myAtom.AtomNumber

 End Sub

See Also