Software Developer's Kit - ChemDraw

Send comments on this topic
Count Property
See Also 

Description

Member of ChemDraw Control.Constraints

Returns the number of constraints in the collection.

Property type

Read-only property

Syntax

Visual Basic
Public Property Count() As Long

Return Type

Long

Remarks

Returns the number of constraints in a collection of atoms.

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 objects collection of Item(1)of the Constraints collection 
     Text3.text = MyConstraints.Item(1).BasisObjects
 End Sub

See Also