Topics
Prev Next

App Object

The App object represents a running instance of Enterprise Architect. Its object provides access to the Automation Interface.

Attributes

Attribute

Type

See also

Project

Project

Notes: Read only

Provides a handle to the Project Interface.

Repository

Repository

Notes: Read only

Provides a handle to the Repository object.

Visible

Boolean

Notes: Read/Write

Whether or not the application is visible.

GetObject() Support

The App object is creatable and a handle can be obtained by creating one. In addition, clients can use the equivalent of Visual Basic's GetObject() to obtain a reference to a currently running instance of Enterprise Architect.

Use this method to more quickly test changes to Add-Ins and external clients, as the Enterprise Architect application and data files do not have to be constantly re-loaded.

For example:

     Dim App as EA.App

     Set App = GetObject(,"EA.App")

     MsgBox App.Repository.Models.Count

Another example, which uses the App object without saving it to a variable:

     Dim Rep as EA.Repository

     Set Rep = GetObject(, "EA.App").Repository

     MsgBox Rep.ConnectionString