Software Developer's Kit - ChemDraw

Send comments on this topic
GetPoint Method
See Also 
index

The location of an object in a collection, counted from the top, starting with 1.

Description

Member of ChemDraw Control.Spline.

Given an index, returns a point used to describe the spline.

Syntax

Visual Basic
Public Function GetPoint( _
   ByVal index As Long _
) As Point

Parameters

index

The location of an object in a collection, counted from the top, starting with 1.

Return Type

Remarks

Given an index, returns one of the points used to describe the spline.

Example

Private Sub ctlChemDraw_SelectionChanged(ByVal selection _
        As ChemDrawControl10Ctl.IChemDrawSelection)
    If  selection.Splines.Count = 1 Then
        Set MySpline = ctlChemDraw.selection.Objects.Splines.Item(1)
        Label1.Caption = "Object: Spline"
    End If
End Sub

Private Sub cmdGetPoint_Click()
    For x = 1 To mySpline.NumPoints
        Set myPoint = mySpline.GetPoint(x)
        ctlChemDraw.MakeSymbol kCDSymbolTypeCirclePlus
        ctlChemDraw.Objects.Symbols.Item(x).Position = myPoint
        ctlChemDraw.Objects.Symbols.Item(x).Color = vbRed
    Next x
    Vmessaje = MsgBox("The points have been marked with symbols", _
               vbInformation + vbOKOnly, "Info")
End Sub

See Also