| 
       | 
        
       | Object Model Reference : Classes : S : Shape : Properties : Shape.SnapPoints  | 
      
Property SnapPoints As SnapPoints
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.
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  | 
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  | 
| 
       | 
        
       | 
		      
		          
		             | 
      
Copyright 2013 Corel Corporation. All rights reserved.