Software Developer's Kit - ChemDraw

Send comments on this topic
BottomRight Property
See Also 

Description

Member of ChemDraw Control.Rect.

Sets and returns the coordinates of the bottom right point of this rectangle.

Property type

Read-write property

Syntax

Visual Basic
Public Property BottomRight() As Point

Return Type

Remarks

BottomRight sets and returns with the (x,y or z) coordinate of the bottom right point of a rectangle. When working on the same rectangle, the value returned from:

BottomRight.X is equivalent to the value returned from Right divided by 20.
BottomRight.Y is equivalent to the value returned from Bottom divided by 20.
BottomRight.Z = 0 when working in two dimensions.  

The BottomRight value is expressed as CurCoords.

Example

'This example illustrates the use of Rect Properties 
'Declares the variables

 Dim myObject  As ChemDrawControl10Ctl.Object
 Dim vObject As ChemDrawControl10Ctl.Object 
 Dim myRect  As ChemDrawControl10Ctl.Rect
'Checks that there is an object loaded in the variable
 If  Selection.Objects.Count < 1 Then 
     Exit Sub
 End If

'Works with one object (could be any ChemDraw object)
 For Each myObject In Selection.Objects
     If  myObject.Selected = True Then
         Set
vObject = myObject
     End If
 Next
 
Private Sub cmdRectProperties_Click()
     Set myRect = vObject.Bounds  
    'Shows the properties of Rect - using the rectangle that bounds an object
     Label1.Caption = "Rect coordinates that return values in CurCoords" + Chr$(13) + _
                  Format(myRect.BottomLeft.X,  "0.0") + "  "     + _
                  Format(myRect.BottomLeft.Y,  "0.0") + Chr$(13) + _
                  Format(myRect.BottomRight.X, "0.0") + "  "     + _
                  Format(myRect.BottomRight.Y, "0.0") + Chr$(13) + _ 
                  Format(myRect.Center.X,      "0.0") + "  "     + _
                  Format(myRect.Center.Y,      "0.0") + Chr$(13) + _
                  Format(myRect.TopLeft.X,     "0.0") + "  "     + _
                  Format(myRect.TopLeft.Y,     "0.0") + Chr$(13) + _
                  Format(myRect.TopRight.X,    "0.0") + "  "     + _
                  Format(myRect.TopRight.Y,    "0.0") + Chr$(13) 

     'Applies the IsEmpty property:  Returns False if Rect contains an object
     Text1.Text = myRect.IsEmpty 
 End Sub 

See Also