Software Developer's Kit - ChemDraw

Send comments on this topic
SymbolType Property
See Also 

Description

Member of ChemDraw Control.Symbol.

Returns the type of symbol.

Property type

Read-only property

Syntax

Visual Basic
Public Property SymbolType() As CDSymbolType

Return Type

Remarks

This is an enumerated property which lists the available types of symbol.

Example

Private Sub ctlChemDraw_SelectionChanged(ByVal selection _
        As ChemDrawControl10Ctl.IChemDrawSelection) 
    If  selection.Symbols.Count = 1 Then
        Set MySymbol = ctlChemDraw.selection.Objects.Symbols.Item(1)
        Label1.Caption = "Object: Symbol"
        cboLoad.AddItem ("kCDSymbolTypeLonePair")
        cboLoad.AddItem ("kCDSymbolTypeElectron")
        cboLoad.AddItem ("kCDSymbolTypeRadicalCation")
        cboLoad.AddItem ("kCDSymbolTypeRadicalAnion")
        cboLoad.AddItem ("kCDSymbolTypeCirclePlus") 
        cboLoad.AddItem ("kCDSymbolTypeCircleMinus")
        cboLoad.AddItem ("kCDSymbolTypeDagger")
        cboLoad.AddItem ("kCDSymbolTypeDoubleDagger")
        cboLoad.AddItem ("kCDSymbolTypePlus")
        cboLoad.AddItem ("kCDSymbolTypeMinus")
        cboLoad.AddItem ("kCDSymbolTypeRacemic")
        cboLoad.AddItem ("kCDSymbolTypeAbsolute") 
        cboLoad.AddItem ("kCDSymbolTypeRelative")
    End If
End Sub
Private Sub Private Sub cboLoad_Click()
    Select Case cboLoad.Text
        Case Is = "kCDSymbolTypeLonePair"
             vName = 0
        Case Is = "kCDSymbolTypeElectron"
             vName = 1
        Case Is = "kCDSymbolTypeRadicalCation"
             vName = 2
        Case Is = "kCDSymbolTypeRadicalAnion"
             vName = 3
        Case Is = "kCDSymbolTypeCirclePlus"
             vName = 4 
        Case Is = "kCDSymbolTypeCircleMinus"
             vName = 5
        Case Is = "kCDSymbolTypeDagger"
             vName = 6
        Case Is = "kCDSymbolTypeDoubleDagger"
             vName = 7
        Case Is = "kCDSymbolTypePlus"
             vName = 8
        Case Is = "kCDSymbolTypeMinus"
             vName = 9 Text
        Case Is = "kCDSymbolTypeRacemic"
             vName = 10
        Case Is = "kCDSymbolTypeAbsolute"
             vName = 11
        Case Is = "kCDSymbolTypeRelative"
             vName = 12
    End Select
    mySymbol.SymbolType = vName
End Sub

See Also