Software Developer's Kit - ChemDraw

Send comments on this topic
BondOrder Property
See Also 

Description

Member of ChemDraw Control.Bond.

Sets and returns the bond order for this bond.

Property type

Read-write property

Syntax

Visual Basic
Public Property BondOrder() As CDBondOrder

Return Type

Remarks

This is a bit-encoded property and returns the order of a bond object. For example, a bond could be double (Bond.BondOrder = kCDBondOrderDouble). If this property is absent, the bond is treated as a single bond and returns the value 1. The available values for BondOrder can be seen in CDBondOrder.

Example

'In the form general section (or as public in the module)
 Dim myBond As ChemDrawControl10Ctl.Bond
'---------------------------------------------------------------------------------
 Private Sub ctlChemDraw_SelectionChanged(ByVal selection As _ 
         ChemDrawControl10Ctl.IChemDrawSelection)   
    'Checks that there is a bond loaded in the variable 
     If  Selection.Bonds.Count < 1 Then 
         Exit Sub
     End If
 End Sub
'---------------------------------------------------------------------------------
 Private Sub Command1_Click()
     Text1.Text= myBond.BondOrder
     myBond.BondOrder = kCDBondOrderThreeHalf
 End Sub

See Also