Software Developer's Kit - ChemDraw

Send comments on this topic
Item Property
See Also 
index

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

Description

Member of ChemDraw control.DataTypes.

Given an index, returns one DataType from the data types collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Item( _
   ByVal index As Variant _
) As dataType

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 DataType of a collection of DataTypes, and all the DataType properties are available. If myDataTypes is a collection of data types, then:

MyDataTypes.Item(i).Extension returns the extension of one DataType in the collection

Example

'Declares variables 
 Dim myDataTypes As ChemDrawControl11Ctl.DataTypes
 Set myDataTypes = ctlChemDraw.Objects.DataTypes

 Private Sub cmdDataTypes_Click()
    'returns the number of DataTypes in the DataTypes collection
     Text1.text = MyDataTypes.Count 
    'returns extension of Item(1) of the DataTypes collection 
     Text2.text = MyDataTypes.Item(1).Extension
 End Sub

See Also