Previous Document Next Document

Object Model Reference : Classes : S : Shape : Properties : Shape.SnapPoints


Shape.SnapPoints

Property SnapPoints As SnapPoints

Description

Member of Shape

The SnapPoints property returns a SnapPoints collection, which represents connection points for the Connector tool.

The SnapPoints property returns a read-only value.

VBA example 1

The following VBA example creates an ellipse at the position of each connection point of the active shape.

Sub Test()
 Dim sp As SnapPoint
 For Each sp In ActiveShape.SnapPoints
  ActiveLayer.CreateEllipse2 sp.PositionX, sp.PositionY, 0.1
 Next sp
End Sub
VBA example 2

The following VBA example creates a rectangle and an ellipse, and it connects their centers with a connector line.

Sub Test()
Dim rect As Shape, ell As Shape
Dim lr As Layer
Set lr = ActiveLayer
Set rect = lr.CreateRectangle(0, 0, 3, 3)
Set ell = lr.CreateEllipse2(5, 5, 1, 1)
lr.CreateConnector rect.SnapPoints(2), ell.SnapPoints(4)
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.