Share via


ConnectionShape Class

Connection Shape.When the object is serialized out as xml, its qualified name is cdr:cxnSp.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.ChartDrawing.ConnectionShape

Namespace:  DocumentFormat.OpenXml.Drawing.ChartDrawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(NonVisualConnectorShapeDrawingProperties))> _
<ChildElementInfoAttribute(GetType(ShapeProperties))> _
<ChildElementInfoAttribute(GetType(Style))> _
Public Class ConnectionShape _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As ConnectionShape
[ChildElementInfoAttribute(typeof(NonVisualConnectorShapeDrawingProperties))]
[ChildElementInfoAttribute(typeof(ShapeProperties))]
[ChildElementInfoAttribute(typeof(Style))]
public class ConnectionShape : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • NonVisualConnectorShapeDrawingProperties <cdr:nvCxnSpPr>

  • ShapeProperties <cdr:spPr>

  • Style <cdr:style>

[ISO/IEC 29500-1 1st Edition]

21.3.2.9 cxnSp (Connection Shape)

This element specifies a connection shape that is used to connect two sp elements. Once a connection is specified using a cxnSp, it is left to the generating application to determine the exact path the connector takes. That is the connector routing algorithm is left up to the generating application as the desired path might be different depending on the specific needs of the application.

[Example:

DocumentFormat.OpenXml.Drawing.ChartDrawing.Connec

end example]

[Example: Consider the following connector shape that connects two regular shapes.

<cdrcdr:grpSp>
  …
  <cdr:sp>
    <cdr:nvSpPr>
      <cdr:cNvPr id="1" name="Rectangle 1"/>
      <cdr:cNvSpPr/>
      <cdr:nvPr/>
    </cdr:nvSpPr>
    …
  </cdr:sp>
  <cdr:sp>
    <cdr:nvSpPr>
      <cdr:cNvPr id="2" name="Rectangle 2"/>
      <cdr:cNvSpPr/>
      <cdr:nvPr/>
    </cdr:nvSpPr>
    …
  </cdr:sp>
  <cdr:cxnSp>
    <cdr:nvCxnSpPr>
      <cdr:cNvPr id="3" name="Elbow Connector 3"/>
      <cdr:cNvCxnSpPr>
        <a:stCxn id="1" idx="3"/>
        <a:endCxn id="2" idx="1"/>
      </cdr:cNvCxnSpPr>
      <cdr:nvPr/>
    </cdr:nvCxnSpPr>
    …
  </cdr:cxnSp>
</cdr:grpSp>

end example]

Parent Elements

absSizeAnchor (§21.3.2.1); grpSp (§21.3.2.13); relSizeAnchor (§21.3.2.21)

Child Elements

Subclause

nvCxnSpPr (Connector Non Visual Properties)

§21.3.2.15

spPr (Shape Properties)

§21.3.2.23

style (Shape Style)

§21.3.2.24

Attributes

Description

fPublished (Publish to Server)

Specifies whether the shape shall be published with the worksheet when sent to the spreadsheet server. This is for use when interfacing with a document server.

[Example: Consider the following shape that is not published with the worksheet when it is published back on the spreadsheet server.

<cdr:relSizeAnchor>

  <cdr:sp fPublished="0">
  ..
  </cdr:sp>

</cdr:relSizeAnchor>

end example]

The possible values for this attribute are defined by the W3C XML Schema boolean datatype.

macro (Reference to Custom Function)

This element specifies the custom function associated with the chart. [Example: A macro script, add-in function, and so on. end example]

The format of this string shall be application-defined, and should be ignored if not understood.

[Example:

<… macro="DoWork()" >

end example]

The possible values for this attribute are defined by the W3C XML Schema string datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_Connector) is located in §A.5.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ConnectionShape Members

DocumentFormat.OpenXml.Drawing.ChartDrawing Namespace