# GrapeCity.Spreadsheet.Drawing.ConnectionShape.BeginConnect

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_BeginConnect_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.BeginConnect*">BeginConnect Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_BeginConnect_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.BeginConnect*"></a>
<h4 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_BeginConnect_GrapeCity_Spreadsheet_Drawing_Shape_System_Int32_System_Boolean_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.BeginConnect(GrapeCity.Spreadsheet.Drawing.Shape,System.Int32,System.Boolean)">BeginConnect(Shape, int, bool)</h4>
<div class="markdown level1 summary"><p>Attaches the beginning of the specified connector to a specified shape.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void BeginConnect(Shape connectedShape, int connectionSite, bool layout = true)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub BeginConnect(connectedShape As Shape, connectionSite As Integer, Optional layout As Boolean = True)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Shape</span></td>
      <td><span class="parametername">connectedShape</span></td>
      <td><p>The shape to attach the beginning of the connector to. The specified Shape object must be in the same Shapes collection as the connector.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">connectionSite</span></td>
      <td><p>A connection site on the shape specified by ConnectedShape.
Must be an integer between 1 and the integer returned by the ConnectionSiteCount property of the specified shape.
If you want the connector to automatically find the shortest path between the two shapes it connects,
specify any valid integer for this argument and then use the RerouteConnections method after the connector is attached to shapes at both ends.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">layout</span></td>
      <td><p>auto adjust layout.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_BeginConnect_GrapeCity_Spreadsheet_Drawing_Shape_System_Int32_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>If there's already a connection between the beginning of the connector and another shape, that connection is broken.
If the beginning of the connector isn't already positioned at the specified connecting site,
this method moves the beginning of the connector to the connecting site and adjusts the size and position of the connector.</p>
</div>


<a id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_BeginConnect_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.BeginConnect*"></a>
<h4 id="GrapeCity_Spreadsheet_Drawing_ConnectionShape_BeginConnect_GrapeCity_Spreadsheet_Drawing_Shape_System_Int32_System_Boolean_System_Boolean_" data-uid="GrapeCity.Spreadsheet.Drawing.ConnectionShape.BeginConnect(GrapeCity.Spreadsheet.Drawing.Shape,System.Int32,System.Boolean,System.Boolean)">BeginConnect(Shape, int, bool, bool)</h4>
<div class="markdown level1 summary"><p>Attaches the beginning of the specified connector to a specified shape.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void BeginConnect(Shape connectedShape, int connectionSite, bool layout, bool updateParentBoundary)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub BeginConnect(connectedShape As Shape, connectionSite As Integer, layout As Boolean, updateParentBoundary As Boolean)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">Shape</span></td>
      <td><span class="parametername">connectedShape</span></td>
      <td><p>The shape to attach the beginning of the connector to. The specified Shape object must be in the same Shapes collection as the connector.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">connectionSite</span></td>
      <td><p>A connection site on the shape specified by ConnectedShape.
Must be an integer between 1 and the integer returned by the ConnectionSiteCount property of the specified shape.
If you want the connector to automatically find the shortest path between the two shapes it connects,
specify any valid integer for this argument and then use the RerouteConnections method after the connector is attached to shapes at both ends.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">layout</span></td>
      <td><p>auto adjust layout.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">updateParentBoundary</span></td>
      <td><p>Update parent boundary.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
