Software Developer's Kit - ChemDraw

Send comments on this topic
Objects Collection
See Also  Members 


Member of ChemDraw Control.

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

ChemDraw Objects Collection contains all of the objects in the document. 


'Shows number of objects within the ChemDraw document  
 Private Sub cmdCommand_Click() 
     Dim myObject1 as ChemDrawControl10Ctl.Object
     Dim myObject2 as ChemDrawControl10Ctl.Object 
    'Checks if at least two Objects have been drawn
     If  ChemDrawControl10Ctl.Objects.Count >= 2 Then 
         Set MyObject1 = ChemDrawControlCtl.Objects.Item(1)
         Set MyObject2 = ChemDrawControlCtl.Objects.Item(2)
        'Returns the number of Objects within the ChemDraw document
         Text1.text = "There are: " & format(ChemDrawControl10Ctl.Objects.Count, "##") & " object/s" 
     End If
 End Sub

See Also