| 
       | 
        
       | Object Model Reference : Classes : L : Layer : Methods : Layer.CreateConnector  | 
      
Function CreateConnector(Start As SnapPoint, End As SnapPoint) As Shape
Member of Layer
The CreateConnector method creates a connector line at a specified location on a layer.
•  | 
  See also the Layer.CreateFreeConnector method.
  | 
|   
Parameter
 
 | 
      
Description
 
 | 
|   
Start
 
 | 
      
Specifies the starting point of the connector-line object
 
 | 
|   
End
 
 | 
      
Specifies the ending point of the connector-line object
 
 | 
The following VBA example creates a rectangle and ellipse on the active layer and draws a connector line between them.
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  | 
The following VBA example creates a rectangle and an ellipse and draws a connector line that joins the center of each object.
Sub Test()  | 
 Dim r As Shape, e As Shape  | 
 Set r = ActiveLayer.CreateRectangle(0, 0, 3, 3)  | 
 Set e = ActiveLayer.CreateEllipse2(5, 5, 1, 1)  | 
 ActiveLayer.CreateConnector r.SnapPoints(r.SnapPoints.Count), _  | 
  e.SnapPoints(e.SnapPoints.Count)  | 
End Sub  | 
| 
       | 
        
       | 
		      
		          
		             | 
      
Copyright 2013 Corel Corporation. All rights reserved.