<Connect> element

<Connect> element

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Represents a connection between two shapes in a drawing, such as a line and a box in an organization chart.

Syntax

  <Connect
      FromSheet = "intval"
      ToSheet = "intval"
      [FromCell = "fromcellname"]
      [FromPart = "intval"]
      [ToCell = "tocellname"]
      [ToPart = "intval"] 
  />

Attributes

FromSheet

Required int. The ID of the shape from which a connection or connections originate.

ToSheet

Required int. The ID of the shape to which one or more connections are made.

FromCell

Optional string. The cell from which a connection originates.

Note The FromCell and FromPart attributes are optional; however, one must be present in the Connect element.

FromPart

Optional int. The part of a shape from which a connection originates.

Note The FromCell and FromPart attributes are optional; however, one must be present in the Connect element.

Value

Description

0

None

1

Left edge

2

Center edge

3

Right edge

4

Bottom edge

5

Middle edge

6

Top edge

7

BeginX cell

8

BeginY cell

9

BeginX/BeginY point

10

EndX cell

11

EndY cell

12

EndX/EndY point

100 + zero-based index of control point

Control point

ToCell

Optional string. The cell to which a connection is made.

Note The ToCell and ToPart attributes are optional; however, one must be present in the Connect element.

ToPart

Optional int. The part of a shape to which a connection is made.

Note The ToCell and ToPart attributes are optional; however, one must be present in the Connect element.

Value

Description

0

None

1

GuideX

2

GuideY

3

Whole shape

4

Guide intersection

7

To Angle

100 + index of connection point

Connection point

Element information

Parent elements:

Connects

Child elements:

None

Remarks

Connect elements are always emitted for a Visio for XML file. However, the Connect elements in a trusted XML for Visio file are ignored when the file is opened by Microsoft Visio.

In untrusted XML files, when Visio opens the file, it uses the Connect elements to set glue formulas for shapes, similar to the GlueTo method in Automation. However, geometry will not be updated, so connectors may need to be manually rerouted.

For more information on trusted XML for Visio files, see An XML for Visio overview.

Example

  <Connects>
<Connect FromSheet="3" FromCell="BeginX" FromPart="9" ToSheet="1" ToCell="Connections.X4" ToPart="103" /><Connect FromSheet="3" FromCell="EndX" FromPart="12" ToSheet="2" ToCell="Connections.X6" ToPart="105" /><Connect FromSheet="6" FromCell="BeginX" FromPart="9" ToSheet="2" ToCell="Connections.X5" ToPart="104" /><Connect FromSheet="6" FromCell="EndX" FromPart="12" ToSheet="5" ToCell="Connections.X3" ToPart="102" /></Connects>

See also

Connect object

GlueTo method