Software Developer's Kit - ChemDraw

Send comments on this topic
GraphicType Property
See Also 

Description

Member of ChemDraw control.Graphic.

Returns the overall type of the graphic.

Property type

Read-only property

Syntax

Visual Basic
Public Property GraphicType() As CDGraphicType

Return Type

Remarks

Returns the overall type of the graphic.

Example

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 = "GraphicType: "
   Select Case MyGraphic.GraphicType
        Case Is = 0
             Label1.Caption = Label1.Caption & "kCDGraphicTypeUndefined"
        Case Is = 1
             Label1.Caption = Label1.Caption & "kCDGraphicTypeLine"
        Case Is = 2
             Label1.Caption = Label1.Caption & "kCDGraphicTypeArc"
        Case Is = 3
             Label1.Caption = Label1.Caption & "kCDGraphicTypeRectangle"
        Case Is = 4
             Label1.Caption = Label1.Caption & "kCDGraphicTypeOval"
        Case Is = 5
             Label1.Caption = Label1.Caption & "kCDGraphicTypeOrbital"
        Case Is = 6
             Label1.Caption = Label1.Caption & "kCDGraphicTypeBracket"
        Case Is = 7
             Label1.Caption = Label1.Caption & "kCDGraphicTypeSymbol"
    End Select
End Sub

See Also