Partager via


Relation Class

Diagram Relationship.When the object is serialized out as xml, its qualified name is o:rel.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Vml.Office.Relation

Namespace:  DocumentFormat.OpenXml.Vml.Office
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class Relation _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As Relation
public class Relation : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

14.2.2.24 rel (Diagram Relationship)

This element specifies a relationship between two diagram nodes. An optional third node that exists between the primary two can also be included. The relationship has an implicit order since it describes the source and destination nodes.

[Example: In the cycle diagram below, shape 1036 (the shape that is the text box for the text "2") is the first node. A relationship exists between shape 1036 and shape 1044 (the text box containing "1"). In between those shapes is shape 1038 (the yellow arrow).

<o:relationtable v:ext="edit">
  <o:rel v:ext="edit" idsrc="#_s1036" iddest="#_s1036"/>
  <o:rel v:ext="edit" idsrc="#_s1042" iddest="#_s1036" idcntr="#_s1043"/>
  <o:rel v:ext="edit" idsrc="#_s1044" iddest="#_s1042" idcntr="#_s1045"/>
  <o:rel v:ext="edit" idsrc="#_s1036" iddest="#_s1044" idcntr="#_s1038"/>
</o:relationtable>
<v:rect id="_s1036" … >
  <v:textbox … ><…>2</…></v:textbox>
</v:rect>
<v:rect id="_s1044" … >
  <v:textbox … ><…>1</…></v:textbox>
</v:rect>
<v:shape id="_s1038" … />

DocumentFormat.OpenXml.Vml.Office.Relation-image00

end example]

Parent Elements

relationtable (§14.2.2.25)

Attributes

Description

ext (VML Extension Handling Behavior)

Namespace: urn:schemas-microsoft-com:vml

Specifies an optional value that indicates how applications that implement VML should interpret extensions not defined as part of the original specification of core VML.

[Rationale: This part of the original VML specification is included to assist applications that leverage existing VML support in implementing the Office Open XML Format. end rationale]

The possible values for this attribute are defined by the ST_Ext simple type (§14.1.3.2).

idcntr (Diagram Relationship Center Shape)

Specifies the optional identifier of the shape that exists between the source and destination shapes. This is omitted if the relationship does not have a shape between the source and destination shapes.

[Example:

<o:rel … idcntr="#s_1038">
</o:rel>

end example]

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

iddest (Diagram Relationship Destination Shape)

Specifies the identifier of the shape at the destination of the relationship.

[Example:

<o:rel … iddest="#s_1044">
</o:rel>

end example]

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

idsrc (Diagram Relationship Source Shape)

Specifies the identifier of the shape at the source of the relationship.

[Example:

<o:rel … idsrc="#s_1036">
</o:rel>

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_Relation) is located in §A.6.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

Relation Members

DocumentFormat.OpenXml.Vml.Office Namespace