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.Symbols

Given an index, returns one symbol from the symbols collection.

Syntax

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

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 symbol of a collection of symbols, and all the symbol properties are available.

MySymbols.Item(i).SymbolType             returns or sets the type of symbol
MySymbols.Item(i).IsRadical                  returns whether the symbol is a radical or not

Example

'Declares variables 
 Dim mySymbols As ChemDrawControl11Ctl.Symbols
 Set mySymbols = ctlChemDraw.Selection.Objects.Symbols

 Private Sub cmdSymbols_Click()
    'returns the application of the Symbols collection
     Text1.text = MySymbols.Application
    'returns the number of Symbols in the Symbols collection
     Text2.text = MySymbols.Count 
    'sets the Item(1) of the Symbols collection 
     mySymbols.Item(1).SymbolType = 4
    'returns element number of Item(1)of the Symbols collection 
     Text3.text = MySymbols.Item(1).SymbolType
 End Sub

See Also