Software Developer's Kit - ChemDraw

Send comments on this topic
LineType Property
See Also 

Description

Member of ChemDraw control.Graphic.

Returns the type of line.

Property type

Read-only property

Syntax

Visual Basic
Public Property LineType() As CDLineType

Return Type

Remarks

The available line types are:

kCDLineTypeBold          
kCDLineTypeDashed     
kCDLineTypeSolid         
kCDLineTypeWavy        

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 = "LineType: "
    Select Case MyGraphic.LineType
        Case Is = 0
             Label1.Caption = Label1.Caption & "kCDLineTypeSolid"
        Case Is = 1
             Label1.Caption = Label1.Caption & "kCDLineTypeDashed"
        Case Is = 2
             Label1.Caption = Label1.Caption & "kCDLineTypeBold"
        Case Is = 4
             Label1.Caption = Label1.Caption & "kCDLineTypeWavy"
    End Select
End Sub

See Also