Software Developer's Kit - ChemDraw

Send comments on this topic
Cells Collection
See Also  Members 


Member of ChemDraw Control.

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

ChemDraw Cells Collection contains all of the cell objects in the document. 

Object Model


Cells is a collection containing all of the cells objects in the ChemDraw document. If myCells is a cells collection object:

MyCells.Application  returns the application associated with the collection of cells
MyCells.Count         returns the number of cells in the collection of cells
MyCells.Parent        returns the parent of the collection of cells
MyCells.Item(i)        given an index, references one cell in particular from the collection of cells, enabling all cell properties


'Declares variables 
 Dim myCells As ChemDrawControl11Ctl.Cells
 Set myCells = ctlChemDraw.Selection.Objects.Cells

 Private Sub cmdCells_Click()
    'returns the application of the cells collection
     Text1.text = MyCells.Application
    'returns the number of cells in the cells collection
     Text2.text = MyCells.Count 
    'sets the Item(1) of the cells collection 
     myCells.Item(1).ElementNumber = 26
    'returns element number of Item(1)of the cells collection 
     Text3.text = MyCells.Item(1).ElementNumber
 End Sub

See Also