Software Developer's Kit - ChemDraw

Send comments on this topic
DataTypes Collection
See Also  Members 


Member of ChemDraw Control.

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

ChemDraw DataTypes Collection contains all of the DataType objects in the document.

Object Model


DataTypes is a collection containing all of the DataType objects in the ChemDraw document. If myDataTypes is an DataTypes collection object:

MyDataTypes.Count          returns the number of DataTypes in the collection
MyDataTypes.Item(i)        given an index, references one DataType in particular

Using myDataTypes.Item(i) all the DataType properties are enabled for myDataTypes(i). This index starts with 1.


'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