Software Developer's Kit - ChemDraw

Send comments on this topic
Constraints Property
See Also 

Description

Member of ChemDraw Control.Document.

Returns the constraints collection of the document.

Property type

Read-only property

Syntax

Visual Basic
Public Property Constraints() As Constraints

Return Type

Remarks

Constraints is a collection containing all of the constraint objects in the document.

Example

'Declares variables  
 Dim myDocument As ChemDrawControl11Ctl.Document

 Dim myConstraints As ChemDrawControl11Ctl.Constraints
 Set myConstraints = ctlChemDraw.Selection.Objects.Constraints

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

See Also