Software Developer's Kit - ChemDraw

Send comments on this topic
OrbitalType Property
See Also 

Description

Member of ChemDraw control.Graphic.

Returns the orbital type of the graphics that are orbital

Property type

Read-only property

Syntax

Visual Basic
Public Property OrbitalType() As CDOrbitalType

Return Type

Remarks

OrbitalType is read only, but as it works with a bit mask, the types of ovals can be modified, changing the value of graphic boolean properties. See CDOrbitalType.

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()
    Label2.Caption = "OrbitalType: "
    If  MyGraphic.IsOrbital = True Then
        Select Case MyGraphic.OrbitalType
            Case Is = 0
               Label2.Caption = Label2.Caption & "kCDOrbitalTypes" ' = 0
            Case Is = 1
               Label2.Caption = Label2.Caption & "kCDOrbitalTypeoval" ' = 1
            Case Is = 2
               Label2.Caption = Label2.Caption & "kCDOrbitalTypelobe" ' = 2
            Case Is = 3
               Label2.Caption = Label2.Caption & "kCDOrbitalTypep" ' = 3
            Case Is = 4
               Label2.Caption = Label2.Caption & "kCDOrbitalTypehybridPlus" ' = 4
            Case Is = 5
               Label2.Caption = Label2.Caption & "kCDOrbitalTypehybridMinus" ' = 5
            Case Is = 6
               Label2.Caption = Label2.Caption & "kCDOrbitalTypedz2Plus" ' = 6
            Case Is = 7
               Label2.Caption = Label2.Caption & "kCDOrbitalTypedz2Minus" ' = 7
            Case Is = 8
               Label2.Caption = Label2.Caption & "kCDOrbitalTypedxy" ' = 8
            Case Is = 256
               Label2.Caption = Label2.Caption & "kCDOrbitalTypesShaded" ' = 256
            Case Is = 512
               Label2.Caption = Label2.Caption & "kCDOrbitalTypesFilled" ' = 512
            Case Is = 513
               Label2.Caption = Label2.Caption & "kCDOrbitalTypeovalFilled" ' = 513
            Case Is = 514
               Label2.Caption = Label2.Caption & "kCDOrbitalTypelobeFilled" ' = 514
            Case Is = 515
               Label2.Caption = Label2.Caption & "kCDOrbitalTypepFilled" ' = 515
            Case Is = 516
               Label2.Caption = Label2.Caption & "kCDOrbitalTypehybridPlusFilled"' = 516
            Case Is = 517
               Label2.Caption = Label2.Caption & "kCDOrbitalTypehybridMinusFilled" ' = 517
            Case Is = 518
               Label2.Caption = Label2.Caption & "kCDOrbitalTypedz2PlusFilled" ' = 518
            Case Is= 519
               Label2.Caption = Label2.Caption & "kCDOrbitalTypedz2MinusFilled" ' = 519
            Case Is = 520
               Label2.Caption = Label2.Caption & "kCDOrbitalTypedxyFilled" ' = 520
            Case Is = 257
               Label2.Caption = Label2.Caption & "kCDOrbitalTypeovalShaded" ' = 257
            Case Is = 258
               Label2.Caption = Label2.Caption & "kCDOrbitalTypelobeShaded" ' = 258
            Case Is = 256
               Label2.Caption = Label2.Caption & "kCDOrbitalTypepShaded" ' = 259
        End Select
    Else
        Label2.Caption = Label2.Caption & "Graphic object is not an Orbital"
    End If
End Sub

See Also