Software Developer's Kit - ChemDraw

Send comments on this topic
IsEmpty Property
See Also 


Member of ChemDraw Control.Rect.

Indicates whether this rectangle is empty, or not.

Property type

Read-only property


Visual Basic
Public Property IsEmpty() As Boolean

Return Type



IsEmpty: returns True if a rectangle does not have an object within its boundaries.

IsEmpty: returns False if a rectangle has an object within its boundaries.


'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
vObject = myObject
     End If
Private Sub cmdRectProperties_Click()
     Set myRect = vObject.Bounds 
    'Shows the properties of Rect - using the rectangle that bounds an object
    'Applies the IsEmpty property: Returns False if Rect contains an object 
     Text1.Text = myRect.IsEmpty
 End Sub

See Also