Software Developer's Kit - ChemDraw

Send comments on this topic
Item Method
See Also 
index

The location of an object in a collection, counted from the top, starting with 1.

Description

Member of ChemDraw Control.StoichiometryGrids.

Given an index, returns one stoichiometry grid from the stoichiometry grids collection

Syntax

Visual Basic
Public Function Item( _
   ByVal index As Long _
) As StoichiometryGrid

Parameters

index

The location of an object in a collection, counted from the top, starting with 1.

Return Type

Remarks

Working with this property, allows referencing any given StoichiometryGrid of a collection of StoichiometryGrids, and all the StoichiometryGrid properties are available.

MyStoichiometryGrids.Item(i).Components    returns the components of a StoichiometryGrid in the collection
MyStoichiometryGrids.Item(i).Bottom            returns the bottom of one StoichiometryGrid in the collection

Example

'Declares variables 
 Dim myStoichiometryGrids As ChemDrawControl11Ctl.StoichiometryGrids
 Set myStoichiometryGrids = ctlChemDraw.Selection.Objects.StoichiometryGrids

 Private Sub cmdStoichiometryGrids_Click()
    'returns the application of the StoichiometryGrids collection
     Text1.text = MyStoichiometryGrids.Application
    'returns the number of StoichiometryGrids in the StoichiometryGrids collection
     Text2.text = MyStoichiometryGrids.Count 
    'returns the number of components of Item(1) of the StoichiometryGrids collection 
     Text3.text = myStoichiometryGrids.Item(1).Components.count
 End Sub

See Also