Software Developer's Kit - ChemDraw

Send comments on this topic
AltGroups Collection
See Also  Members 

Description

Member of ChemDraw Control.

For a list of all members defined for this collection, see AltGroups Members.

ChemDraw AltGroups Collection contains all of the AltGroup objects in the document.

Object Model

Remarks

AltGroups is a collection containing all of the AltGroup objects in the ChemDraw document. If myAltGroups is an AltGroups collection object:

myAltGroups.Item(i)           returns one AltGroup from the collection of AltGroups
myAltGroups.Application     returns the application of the collection of AltGroups
myAltGroups.Count            returns the number of AltGroups in the collection
myAltGroups.Parent           returns the parent of the collection of AltGroups

Using myAltGroups.Item(i) all the AltGroup properties are enabled for myAltGroup(i). This index starts with 1. 

Example

'This example uses AltGroups.Item(1) 
 Private Sub cmdShowAtoms_Click()
    Dim vAltGroup as ChemDrawControl10Ctl.AltGroup
    Set vAltGroup = ctlChemDraw.AltGroups.Item(1)
    For I = 1 To vAltGroup.Atoms.Count
        If  vAltGroup.Atoms.Item(I).IsAttachmentPoint = False Then
            List1.AddItem (vAltGroup.Atoms.Item(I).LabelText)
        Else
            List1.AddItem ("Number:º " & I & " is an attachment point")
        End If
     Next I
 End Sub

See Also