Software Developer's Kit - ChemDraw

Send comments on this topic
SRULabel Property
See Also 

Description

Member of ChemDraw Control.Bracket.

Sets and returns the structural repeating unit label for this bracket.

Property type

Read-write property

Syntax

Visual Basic
Public Property SRULabel() As String

Return Type

String

Remarks

Structural Repeating Unit sets and returns the label associated with a BracketedGroup that represents an SRU. The SRU label can be any text.  In Active X Control Ver. 10 this property only returns the label.

Example

'Declares variables
 Dim vbracket1 As ChemDrawControl10Ctl.bracket
 Dim vbracket2 As ChemDrawControl10Ctl.bracket 

'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.BracketUsuage =  kCDBracketUsageSRU Then
        'sets the SRU Label
        lblDescription.Caption = "SRU Label"
        vBracket1.SRULabel = Text1.text
    End If
End Sub

See Also