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

Given an index, returns one Picture from the pictures collection.

Syntax

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

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

MyPictures.Item(i).PictureType:        returns the type picture
myPictures.Item(i).Bottom:              returns the bottom of the rectangle bounding the picture

Example

'Declares and loads variable
 Dim myPictures As ChemDrawControl11Ctl.Pictures
 Set myPictures = ctlChemDraw.Selection.Objects.Pictures

 Private Sub cmdPictures_Click()
    'returns the application of the Pictures collection
     Text1.text = MyPictures.Application
    'returns the number of Pictures in the Pictures collection
     Text2.text = MyPictures.Count 
    'sets the Item(1) of the Pictures collection 
     myPictures.Item(1).Selected = True
    'returns element number of Item(1) of the Pictures collection 
     Text3.text = MyPictures.Item(1).PictureType
 End Sub

See Also