Software Developer's Kit - ChemDraw

Send comments on this topic
ChemDrawCtl Object
See Also  Members 

Description

CS ChemDraw Control. 

For a list of all member defined for this object, see ChemDrawCtl Members.

ChemDrawCtl Class represents a ChemDrawCtl object. 

Object Model









































Example

'Declares a ChemDrawControl object and returns number of objects in the application
 
Private Sub cmdShowNumberOfAtoms_Click() 
     Dim myAtom1 as ChemDrawControl10Ctl.Atom
     Dim myAtom2 as ChemDrawControl10Ctl.Atom 
    'Checks if at least two Atoms have been drawn
     If  ChemDrawControlCtl.Objects.Atoms.Count > 2 Then 
         Set MyAtom1 = ChemDrawControlCtl.Objects.Atoms.Item(1)
         Set MyAtom2 = ChemDrawControlCtl.Objects.Atoms.Item(2)
        'Returns the number of Atoms within the ChemDraw document
         Text2.text = "There are: " & format(ChemDrawControlCtl.Objects.Atoms.Count, "##") & " Atom/s" 
     End If
 End Sub

See Also