Command Class

Command.When the object is serialized out as xml, its qualified name is p:cmd.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Presentation.Command

Namespace:  DocumentFormat.OpenXml.Presentation
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(CommonBehavior))> _
Public Class Command _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Command
[ChildElementInfoAttribute(typeof(CommonBehavior))]
public class Command : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • CommonBehavior <p:cBhvr>

[ISO/IEC 29500-1 1st Edition]

19.5.28 cmd (Command)

This element describes the several non-durational commands that can be executed within a timeline. This can be used to send events, call functions on elements, and send verbs to embedded objects. For example “Object Action” effects for Embedded objects and Media commands for sounds/movies such as "PlayFrom(0.0)" and "togglePause".

Parent Elements

childTnLst (§19.5.25); subTnLst (§19.5.78); tnLst (§19.5.87)

Child Elements

Subclause

cBhvr (Common Behavior)

§19.5.22

Attributes

Description

cmd (Command)

This attribute defines the actual command to be issued. Depending on the command specified, the actual command can be made to invoke a wide range of actions on the linked or embedded object.

Reserved Values (when type = “call”):

Value

Description

play

play corresponding media

playFrom(s)

play corresponding media starting from s, where s is the number of seconds from the beginning of the clip

pause

pause corresponding media

resume

resume play of corresponding media

stop

stop play of corresponding media

togglePause

play corresponding media if media is already paused, pause corresponding media if media is already playing. If the corresponding media is not active, this command restarts the media and plays from its beginning.

Reserved Values (when type = “evt”):

Value

Description

onstopaudio

stop play of all audio

Reserved Values (when type = “verb”):

Value

Description

0

Open the object for editing

1

Open the object for viewing

The value of the cmd attribute shall be the string representation of an integer that represents the embedded object verb number. This verb number determines the action that the rendering application should take corresponding to this object when this point in the animation is reached.

[Example: Consider the following command

<p:cmd type="evt" cmd="onstopaudio">
  <p:cBhvr>
    <p:cTn display="0" masterRel="sameClick">
      <p:stCondLst>
        <p:cond evt="begin" delay="0">
          <p:tn val="5"/>
        </p:cond>
      </p:stCondLst>
    </p:cTn>
    <p:tgtEl>
      <p:sldTgt/>
    </p:tgtEl>
  </p:cBhvr>
</p:cmd>

end example]

In the above example, the event of onstopaudio stops all audio from playing once this particular animation is reached in the timeline.

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

type (Command Type)

This attribute specifies the kind of command that is issued by the rendering application to the appropriate target application or object.

There are three possible values, call, evt, and verb. A call command type is used to specify the class of commands that can then be issued.

Call commands (type=”call”): This command type is used to call methods on the object specified (play(), pause(), etc.)

Event Commands (type=”evt”): This command type is used to set an event for the object at this point in the timeline (onstopaudio, etc.)

Verb Commands (type=”verb”): This command type is used to set verbs for the object to occur at this point in the timeline (0, 1, etc.)

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

[Note: The W3C XML Schema definition of this element’s content model (CT_TLCommandBehavior) is located in §A.3. 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

Command Members

DocumentFormat.OpenXml.Presentation Namespace