Software Developer's Kit - ChemDraw

Send comments on this topic
PolymerFlipType Property
See Also 

Description

Member of ChemDraw Control.Bracket

Sets and returns the polymer flip type for this bracket.

Property type

Read-write property

Syntax

Visual Basic
Public Property PolymerFlipType() As CDPolymerFlipType

Return Type

Remarks

This is an enumerated property.  For ladder-type polymers (those polymers with two connecting bonds on each side), there is a potential ambiguity in the order of the connections.  The Flip Type property is designed to resolve that ambiguity.  This property is appropriate only for brackets with exactly two crossing bonds. The possible values are: kCDPolymerFlipTypeFlip,
kCDPolymerFlipTypeNoFlip and kCDPolymerFlipTypeUnspecified.

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 cboFlipType_Click()
     Select Case cboFlipType.Text
       Case Is = "TypeFlip"
            vBracket1.PolymerFlipType = kCDPolymerFlipTypeFlip
            If  BracketNum = True Then
                vBracket2.PolymerFlipType = kCDPolymerFlipTypeFlip
            End If
       Case Is = "TypeNoFlip"
            vBracket1.PolymerFlipType = kCDPolymerFlipTypeNoFlip
            If  BracketNum = True Then
                vBracket2.PolymerFlipType = kCDPolymerFlipTypeNoFlip
            End If
       Case Is = "Unspecified"
            vBracket1.PolymerFlipType = kCDPolymerFlipTypeUnspecified
            If  BracketNum = True Then
                vBracket2.PolymerFlipType = kCDPolymerFlipTypeUnspecified
            End If
     End Select 
     Text1.text = vBracket1.PolymerFlipType

 End Sub

See Also