Software Developer's Kit - ChemDraw

Send comments on this topic
Application Property
See Also 

Description

Member of ChemDraw Control.AltGroups.

Returns the application associated with the AltGroups collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Application() As Object

Return Type

Remarks

The property Application returns the application associated with the AltGroups collection

Example

'Returns the application of the AltGroups collection 
 Private Sub cmdShowNumberOfAltGroups_Click() 
 Dim myAltGroup1 as ChemDrawControl10Ctl.AltGroup
 Dim myAltGroup1 as ChemDrawControl10Ctl.AltGroup 
'Checks if at least two AltGroup have been drawn
 If  ctlChemDraw.Objects.AltGroups.Count > 2 Then 
     Set MyAltGroup1 = ChemDrawControlCtl.AltGroups.Item(1)
     Set MyAltGroup2 = ChemDrawControlCtl.AltGroups.Item(2)
    'Returns the number of atoms in each AltGroup
     vMessage = MsgBox("AltGroup1 has: " & MyAltGroup1.Atoms.Count & " Atom/s" _
                    & "AltGroup2 has: " & MyAltGroup2.Atoms.Count& " Atom/s", _
                    vbInformation + vbOKOnly, "Info") 
    'Returns the application of the AltGroups
     Text1.text = "The application is: " & ChemDrawControlCtl.AltGroups.Application  
 End If
 End Sub

See Also