Software Developer's Kit - ChemDraw

Send comments on this topic
AltGroups Property
See Also 

Description

Member of ChemDraw Control.Group.

Returns the AltGroups collection of this group.

Property type

Read-only property

Syntax

Visual Basic
Public Property AltGroups() As AltGroups

Return Type

Remarks

This property refers to the collection of AltGroups within this Group. The properties associated with the collection are the following:

myGroup.AltGroups.Application      returns the application associated with the collection of AltGroups
myGroup.AltGroups.Count             returns the number of AltGroups that are in this AltGroup
myGroup.AltGroups.Item(i)            returns one AltGroup from the collection of AltGroups
myGroup.AltGroups.Parent            returns the parent of the collection of AltGroups

With myGroup.AltGroups.Item(i) all the AltGroup properties are enabled for AltGroup(i). This index starts with 1.

Example

'Shows number of AltGroups within one Group   
 Private Sub cmdShowNumberOfAltGroups_Click() 
     Dim myGroup as ChemDrawControl10Ctl.Group
     'Checks if at least one Group has been drawn
     If  ChemDrawControl10Ctl.Objects.Groups.Count >= 1 Then 
         Set MyGroup = ChemDrawControl10Ctl.Objects.Groups.Item(1)
         'Returns the number of AltGroups within myGroup
         Text1.text = "myGroup has: " & format(MyGroup.AltGroups.Count, "##") & " AltGroup/s" 
     End If
 End Sub

See Also