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

Given an index, returns one constraint from the constraints collection.

Syntax

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

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 constraint from a collection of constraints and all the constraint properties are available.

Example

'Declares variables 
 Dim myConstraints As ChemDrawControl11Ctl.Constraints
 Set myConstraints = ctlChemDraw.Selection.Objects.Constraints

 Private Sub cmdConstraints_Click()
    'returns the application of the Constraints collection
     Text1.text = MyConstraints.Application
    'returns the number of Constraints in the Constraints collection
     Text2.text = MyConstraints.Count 
    'sets the Item(1) of the Constraints collection 
     myConstraints.Item(1).Border.Color = VBRed
    'returns the objects collection of Item(1)of the Constraints collection 
     Text3.text = MyConstraints.Item(1).BasisObjects
 End Sub

See Also