Previous Document Next Document
Shape.SnapPoints

Property SnapPoints As SnapPoints

Member of Shape

The SnapPoints property returns a collection of shape SnapPoints, which represents connection points for the connector tool.

The SnapPoints property returns a read-only value.

The following code example creates ellipses 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 

The following code 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(9), ell.SnapPoints(5) 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.