Software Developer's Kit - ChemDraw

Send comments on this topic
Count Property
See Also 

Description

Member of ChemDraw Control.Pictures

Returns the number of pictures in the pictures collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Count() As Long

Return Type

Long

Remarks

Returns the number of Pictures in a collection of Pictures.

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