Software Developer's Kit - ChemDraw

Send comments on this topic
RingBondCount Property
See Also 

Description

Member of ChemDraw Control.Atom.

Sets and returns the ring bond count for this atom.

Property type

Read-write property

Syntax

Visual Basic
Public Property RingBondCount() As CDRingBondCount

Return Type

Remarks

The ring bond count property specifies the number of bonds attached to an atom that are part of rings of any size. For simple cases, this also specifies the maximum number of rings in which an atom can reside. Ring bond counts can be: Unspecified, CountNoRingBonds, CountAsDrawn, CountSimpleRing, CountFusion or CountSpiroOrHigher.

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 cmdRingBondCount_Click() 
    'RingBondCount:These values don't start with 0, they start at -1
     myAtom.RingBondCount = val(text1.text) 
     Text2.text = myAtom.RingBondCount  
 End Sub

See Also