EA_OnContextItemChanged

Return to Introduction  Previous page  Next page

EA_OnContextItemChanged notifies Add-Ins that a different item is now in context.

 

Syntax

 

Sub EA_OnContextItemChanged(Repository As EA.Repository, GUID As String, ot as EA.ObjectType)

 

The EA_OnContextItemChanged function syntax contains the following elements

 

 

Parameter

Type

Direction

Description

Repository

EA.Repository

 

IN

An EA.Repository object representing the currently open Enterprise Architect model. Poll its members to retrieve model data and user interface status information.

GUID

String

IN

Contains the GUID of the new context item. This value corresponds to the following properties, depending on the value of  the ot parameter:

 

ot (ObjectType)

GUID value

otElement

Element.ElementGUID

otPackage

Package.PackageGUID

otDiagram

Diagram.DiagramGUID

otAttribute

Attribute.AttributeGUID

otMethod

Method.MethodGUID

otConnector

Connector.ConnectorGUID

otRepository

NOT APPLICABLE, GUID is an empty string

 

 

ot

EA.ObjectType

IN

Specifies the type of the new context item.

 

 

Return Value

 

None

 

Details

 

This event occurs after a user has selected an item anywhere in the Enterprise Architect GUI. Add-Ins that require knowledge of the current item in context  can subscribe to this broadcast function. If ot = otRepository, then this function behaves the same as EA_FileOpen.

See Also