Software Developer's Kit - ChemDraw

Send comments on this topic
SetPoint Method
See Also 
index

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

newVal
An object point that is used to describe the spline.

Description

Member of ChemDraw Control.Spline.

Given an index, sets that point used to describe the spline.

Syntax

Visual Basic
Public Sub SetPoint( _
   ByVal index As Long, _
   ByVal newVal As Point _
) 

Parameters

index

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

newVal
An object point that is used to describe the spline.

Remarks

Given an index, sets that point 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 cmdSetPoint_Click()
    Set myPoint = mySpline.GetPoint(3)
    myPoint.x = myPoint.x + 10
    myPoint.y = myPoint.y + 10
    Dim SP As Integer
    SP = mySpline.NumPoints + 1
    mySpline.SetPoint SP, myPoint
    mySpline.GetPoint (SP)
    ctlChemDraw.MakeSymbol kCDSymbolTypeCirclePlus
    ctlChemDraw.Objects.Symbols.Item(1).Position = myPoint
    ctlChemDraw.Objects.Symbols.Item(1).Color = vbBlue
    Vmessaje = MsgBox("The new point has been marked with a blue symbol", _
               vbInformation + vbOKOnly, "Info")
End Sub

See Also