Share via


EventItem Element

Encapsulates an event code.

An EventItem element can trigger two kinds of actions: it can run an add-on, or it can send a notification of the event to the calling program.

Syntax

<EventItem
    ID
    Action
    EventCode    
    Target
    TargetArgs
    [Enabled]>
</EventItem>

Attributes

ID

Required int. The ID of the event.

Action

Required int. Specifies the action code of the parent EventItem element.

For an EventItem element to be saved in a DatadiagramML file, it must be persistable. Currently, the only valid action code a persistable event can have is 1 (ONEVENT_ACT_RUNADDON).

EventCode

Required int. A code indicating the event that triggers the add-on. For more information on event codes, see Event Codes in the Microsoft Visio 2007 Automation Reference.

Target

Required string. Specifies the target of an event.

TargetArgs

Required string. Specifies a string containing arguments to be sent to the target of an event.

Enabled

Optional boolean. Represents a flag indicating if the event is enabled or disabled.

Value

Description

0

The event is disabled.

1

The event is enabled.

Element properties

Property

Value

Name

EventItem

Minimum Occurrences

0

Maximum Occurrences

Unbounded

Element information

Parent elements

EventList

Child elements

None

See also

Event object