Software Developer's Kit - ChemDraw

Send comments on this topic
PolymerRepeatPattern Property
See Also 

Description

Member of ChemDraw Control.Bracket.

Sets and returns the polymer repeat pattern for this bracket.

Property type

Read-write property

Syntax

Visual Basic
Public Property PolymerRepeatPattern() As CDPolymerRepeatPattern

Return Type

Remarks

For simple linear polymers, the repeating units may connect head-to-tail or head-to-head (or their repeat pattern might be a mixture of both or unknown).  If this property is absent then the repeating unit is assumed to connect head-to-tail.   

Example

 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
             BracketNum = False
             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)
             BracketNum = True
         End If
     End If
 End Sub 

 Private Sub cboRepeatPattern_Click()
    Select Case cboRepeatPattern.Text
       Case Is = "Either/Unknown"
            vBracket1.PolymerRepeatPattern = kCDPolymerRepeatPatternEitherUnknown
            If  BracketNum = True Then
                vBracket2.PolymerRepeatPattern = kCDPolymerRepeatPatternEitherUnknown
            End If
       Case Is = "Head-To-Head"
            vBracket1.PolymerRepeatPattern = kCDPolymerRepeatPatternHeadToHead
            If  BracketNum = True Then
                vBracket2.PolymerRepeatPattern = kCDPolymerRepeatPatternHeadToHead
            End If
       Case Is = "Head-To-Tail"
            vBracket1.PolymerRepeatPattern = kCDPolymerRepeatPatternHeadToTail
            If  BracketNum = True Then
                vBracket2.PolymerRepeatPattern = kCDPolymerRepeatPatternHeadToTail
            End If
     End Select
 End Sub

See Also