Software Developer's Kit - ChemDraw

Send comments on this topic
Parent Property
See Also 


Member of ChemDraw Control.Spline.

Returns the parent of this Spline, if any.

Property type

Read-only property


Visual Basic
Public Property Parent() As Object

Return Type


This property will return the parent of the object if the object has a parent. An example of use of the parent property is with Bond.Parent. A bond has a parent, because a bond consists of the actual bond, and an atom at each end of the bond.

Another example of use of the parent property, is with an AltGroup, where a parent structure can be used to submit a single query, instead of submitting multiple queries on structures that share a common substructure. The parent structure can have attachment points to a list of alternative groups that you define. Numbered attachment points allow you to specify precisely how the structure fragments are connected to your parent structure.


'Declares variable bond 
 Dim myBond As ChemDrawControl10Ctl.Bond
'Checks that there is a bond loaded in the variable
 If  Selection.Bonds.Count < 1 Then
     Exit Sub
 End If

 Private Sub Command1_Click()
     vMessage = MsgBox("The parent ID of this bond is: " & myBond.Parent.ID, _
                vbInformation + vbOKOnly, "Info")
 End Sub

See Also