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

Default member of ChemDraw Control.Brackets

Given an index, returns one bracket from the brackets collection.

Syntax

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

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

MyAtoms.Item(i).ElementNumber:   returns or sets the element number of one atom in the collection
MyAtoms.Item(i).LabelText:            returns or sets the LabelText of one atom in the collection

Example

'Declares variable bracket variables  
 Dim myBrackets As ChemDrawControl11Ctl.Brackets
 
Set myBrackets = ctlChemDraw.Selection.Objects.Brackets

 Private Sub cmdbracketsItem_Click()
    'returns the application of the brackets collection
     Text1.text = MyBrackets.Application
    'returns the number of brackets in the brackets collection
     Text2.text = MyBrackets.Count
    'sets the Item(1) of the brackets collection 
     myBracket.Item(1).BracketType = 2
    'returns element number of Item(1)of the brackets collection
     Text3.text = MyBrackets.Item(1).SRULabel
 End Sub

See Also