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

Given an index, returns one ObjectTag from the ObjectTags collection.

Syntax

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

Parameters

index

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

Remarks

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

MyObjectTags.Item(i).ObjectTagType:   returns or sets type of data of the ObjectTag
myObjectTags.Item(i).Owner:               returns the owner of the ObjectTag

Example

'Declares and loads variable
 Dim myObjectTags As ChemDrawControl11Ctl.ObjectTags
 Set myObjectTags = ctlChemDraw.Selection.Objects.ObjectTags

 Private Sub cmdObjectTags_Click()
    'returns the application of the ObjectTags collection
     Text1.text = MyObjectTags.Application
    'returns the number of ObjectTags in the ObjectTags collection
     Text2.text = MyObjectTags.Count 
    'sets the Item(1) of the ObjectTags collection 
     myObjectTags.Item(1).ObjectTagType = 2
    'returns element number of Item(1)of the ObjectTags collection 
     Text3.text = MyObjectTags.Item(1).ObjectTagType
 End Sub

See Also