Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

App Object

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

Attribute

Type

Notes

Project

Project

Read only. Provides a handle to the Project Interface.

Repository

Repository

Read only. Provides a handle to the Repository object.

Visible

Boolean

Read/Write. Whether or not the application is visible.

Topic

Detail

Link

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