Software Developer's Kit - ChemDraw

Send comments on this topic
Objects Property
See Also 


Member of ChemDraw Control.Group. 

Returns the objects collection of this group.

Property type

Read-only property


Visual Basic
Public Property Objects() As Objects

Return Type



The Objects property refers to the collection of Objects which is within this Group. The properties associated with the collection are the following:

myGroup.Objects.Application      returns the application associated with the Objects collection
myGroup.Objects.Count             returns the number of Objects in the collection
myGroup.Objects.Item(i)           returns one object from the collection 
myGroup.Objects.Parent            returns the parent of the Objects collection


'Shows number of objects within one Group   
 Private Sub cmdShowNumberOfObjects_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 Objects within myGroup
         Text1.text = "myGroup has: " & format(MyGroup.Objects.Count, "##") & " object/s" 
     End If
 End Sub

See Also