Software Developer's Kit - ChemDraw

Send comments on this topic
End Property
See Also 

Description

Member of ChemDraw Controll.Bracket.

Sets and returns the end-position of this bracket.

Property type

Read-write property

Syntax

Visual Basic
Public Property End() As Point

Return Type

Remarks

This property sets and returns a point, with its coordinates, as the end point of a bracket.

Example

'Declares variable bracket
 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 cmdEnd_click()
   
'Reads the X & Y coordinates of the bracket´s end point 
     Text1.text = vbracket1.End.X
     Text2.text = vbracket1.End.Y
    'Example to ASSIGN values to the X & Y coordinates of the bracket´s end point 
     Dim myPoint As ChemDrawControl10Ctl.Point
     Set myPoint = vbracket1.End
     myPoint.X = 350
     myPoint.Y = 150
     vbracket1.End = myPoint
     Label1.Caption = "END" + chr$(13) + _
            Format(vbracket1.End.X, "0.0") + " End X" + Chr$(13) + _
            Format(vbracket1.End.Y, "0.0") + " End Y" + Chr$(13)
 End Sub

See Also