Software Developer's Kit - ChemDraw

Send comments on this topic
SubstituentCount Property
See Also 

Description

Member of ChemDraw Control.Atom.

Sets and returns the substitution restriction limit on this atom

Property type

Read-write property

Syntax

Visual Basic
Public Property SubstituentCount() As Long

Return Type

Long

Remarks

In ChemDraw, a substituent is defined as a non-hydrogen atom connected by a bond of any order.

For example, in the figure below, the carbonyl carbon, indicated by the arrow, has a substituent count of two: the alpha carbon and the aldehyde oxygen. The double bond to the aldehyde oxygen counts as only one substituent and hydrogen atoms never count as substituents.

The substituent count atom property allows you to specify the number of bonds to an atom in the target structure. This includes bonds already drawn in the query structure.

Example

'Declares variables
 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

'Reads and sets this property
 Private Sub cmdSubstituenCount_Click() 
     myAtom.SubstituenCount = val(text1.text) 
     Text2.text = myAtom.SubstituenCount  
 End Sub

See Also