Software Developer's Kit - ChemDraw

Send comments on this topic
RectangleType Property
See Also 


Member of ChemDraw control.Graphic.

Returns the RectangleType for a graphic object that is a rectangle.

Property type

Read-only property


Visual Basic
Public Property RectangleType() As CDRectangleType

Return Type


RectangleType is a read only property for a graphic object that is a rectangle, but as it works with a bit mask, modifying the boolean properties of the rectangle, the type of rectangle can be modified. Types of rectangle are enumerated CDRectangleType.


Private Sub ctlChemDraw_SelectionChanged(ByVal selection As ChemDrawControl10Ctl.IChemDrawSelection)
    If  selection.Graphics.Count = 1 Then
        Set MyGraphic = ctlChemDraw.selection.Objects.Graphics.Item(1)
        Label1.Caption = "Object: Graphic"
    End If
End Sub

Private Sub Command1_Click()
    Label1.Caption = "RectangleType"
   'Verifies if it is a Rectangle (otherwise, an error may occur)
    If  MyGraphic.IsRectangle = True Then
        Label2.Caption = MyGraphic.RectangleType
        Label2.Caption = "MyGraphic isn't a Rectangle"
    End If
End Sub

See Also