Software Developer's Kit - ChemDraw

Send comments on this topic
CrossingBonds Property
See Also 


Member of ChemDraw Control.Bond.

Returns the bonds that cross this bond.

Property type

Read-only property


Visual Basic
Public Property CrossingBonds() As Bonds

Return Type


When one bond crosses another, white space is used to indicate which bond is in front of the other. In the picture the selected bond is in front of the other one. This property returns the number of bonds that cross this bond.

In this example, myBond being the selected bond in the picture, the following line of code:

         Text1.text = myBond.CrossingBonds

returns the value of  1


'In the form general section (or as public in the module)
 Dim myBond As ChemDrawControl10Ctl.Bond
 Private Sub ctlChemDraw_SelectionChanged(ByVal selection As _ 
    '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.CrossingBonds.Count
 End Sub

See Also