Software Developer's Kit - ChemDraw

Send comments on this topic
RepeatCount Property
See Also 

Description

Member of ChemDraw Control.Bracket.

Sets and returns the repeat count for this bracket.

Property type

Read-write property

Syntax

Visual Basic
Public Property RepeatCount() As Double

Return Type

Double

Remarks

This property sets and returns the number of times a multiple-group BracketedGroup is repeated.  Bracket usage is of type kCDBracketUsageMultipleGroup. The Repeat Count should be a positive number. Non-positive and non-numeric Repeat Counts have no meaning.  Although fractional Repeat Counts are allowed, it is recommended that integral values be used wherever possible for maximum compatibility. In Active X Control Ver. 10 this property only returns the  value.

Example

'Declares variables
 Dim vbracket1 As ChemDrawControl10Ctl.bracket
 Dim vbracket2 As ChemDrawControl10Ctl.bracket
 Dim BracketNum as Boolean
'Checks that there is a bracket loaded in the variable
 Private Sub ctlChemDraw_SelectionChanged(ByVal selection _ 
         As ChemDrawControl10Ctl.IChemDrawSelection) 
     If  Selection.brackets.Count < 1 OR Selection.Brackets.Count > 2 Then
         Exit Sub
     Else
         If 
Selection.Brackets.Count = 1 Then
             Set vbracket1 =  ctlChemDraw.Selection.Objects.Brackets.Item(1)
         Else
             Set
vbracket1 =  ctlChemDraw.Selection.Objects.Brackets.Item(1)
             Set vbracket2 =  ctlChemDraw.Selection.Objects.Brackets.Item(2)
         End If
     End If
 End Sub 

 Private Sub cmdCommand1_Click()
     If  vBracket1.BracketUsage = kCDBracketUsageMultipleGroup Then
         'Repeat Count 
         lblDescription.Caption = "Repeat Count"
         vBracket1.RepeatCount = Text1.text
     End If
 End Sub

See Also