DiagramChooseIf class

Office 2013 and later

If. When the object is serialized out as xml, its qualified name is dgm:if.

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.Diagrams.DiagramChooseIf

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

[ChildElementInfoAttribute(typeof(Shape))]
[ChildElementInfoAttribute(typeof(Algorithm))]
[ChildElementInfoAttribute(typeof(RuleList))]
[ChildElementInfoAttribute(typeof(PresentationOf))]
[ChildElementInfoAttribute(typeof(Constraints))]
[ChildElementInfoAttribute(typeof(LayoutNode))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(ForEach))]
[ChildElementInfoAttribute(typeof(Choose))]
public class DiagramChooseIf : OpenXmlCompositeElement

[ISO/IEC 29500-1 1st Edition]

if (If)

Like an if statement in a programming language, wraps elements which are to be used under the conditions defined by its attributes.

[Example: Consider the following example of an if element in a DrawingML diagram within the context of a choose statement:

<choose name="Name1">
<if name="Name2" func="var" arg="dir" op="equ" val="norm">
<alg type="snake">
<param type="grDir" val="tL"/>
<param type="flowDir" val="row"/>
<param type="contDir" val="sameDir"/>
<param type="off" val="ctr"/>
</alg>
</if>
<else name="Name3">
<alg type="snake">
<param type="grDir" val="tR"/>
<param type="flowDir" val="row"/>
<param type="contDir" val="sameDir"/>
<param type="off" val="ctr"/>
</alg>
</else>
</choose>

In this example, a if element is used to define a set of parameters associated with the snake algorithm when the diagram is in the normal direction. end example]

Parent Elements

choose (§21.4.2.6)

Child Elements

Subclause

alg (Algorithm)

§21.4.2.3

choose (Choose Element)

§21.4.2.6

constrLst (Constraint List)

§21.4.2.9

extLst (Extension List)

§21.4.2.13

forEach (For Each)

§21.4.2.14

layoutNode (Layout Node)

§21.4.2.19

presOf (Presentation Of)

§21.4.2.21

ruleLst (Rule List)

§21.4.2.25

shape (Shape)

§21.4.2.27

Attributes

Description

arg (Argument)

Specifies the variable to use as part of the test in an if element.  Ignored unless the function attribute is set to "var".

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

axis (Axis)

Specifies the axis on which to select data from the data model.

[Example: axis="ch" selects children of the current point node and axis="des" selects all descendants. end example]

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

cnt (Count)

Specifies the count of items to use in a data set.

[Example: Consider the following example of a forEach in a DrawingML diagram:

<forEach name="Name5" ref="" axis="ch" ptType="node" cnt="2">
…
</forEach>

In this example, up to two children are obtained through this forEach. end example]

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

func (Function)

The function used to evaluate the if condition.

[Example: Consider the following example of func being used in DrawingML:

<if name="Name2" func="var" arg="dir" op="equ" val="norm">
…
</if>

In this example, func is set to var. end example]

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

hideLastTrans (Hide Last Transition)

In algorithms that support transitions, this attribute specifies that the last transition is not rendered.  This allows for diagrams that start and end with a node.

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

name (Name)

A unique identifier for the layout node.

The function used to evaluate the if condition.

[Example: Consider the following example of name being used in DrawingML:

<if name="Name2" func="var" arg="dir" op="equ" val="norm">
…
</if>

In this example, the name attribute is set to Name2. end example]

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

op (Operator)

The operator used to evaluate the condition.

[Example: Consider the following example of op being used in DrawingML:

<if name="Name2" func="var" arg="dir" op="equ" val="norm">
…
</if>

In this example, op is being used to test the equality of the argument and value. end example]

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

ptType (Data Point Type)

Specifies the type of data point to select.

[Example: Consider the following example of a forEach in a DrawingML diagram:

<forEach name="Name5" ref="" axis="ch" ptType="node" cnt="2">
…
</forEach>

In this example, the forEach selects all node type points in the set. end example]

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

st (Start)

Specifies where to start in a data set.

[Example: Consider the following example of a forEach in a DrawingML diagram:

<presOf axis="desOrSelf" ptType="node" st="2"/>

In this example, the second element in the set is the first point returned. end example]

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

step (Step)

Specifies the step to use in a data set. A step with a value of 2 returns every other item in the set.

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

val (Value)

An absolute value.

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

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

© ISO/IEC29500: 2008.

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