Enterprise Architect Object Model
The Enterprise Architect Object Model gives the scripter or programmer access to the underlying objects that you can use to query or manipulate the repository. The Object Model is accessible either from internal or external scripting environments or through Add-Ins. This is a convenient feature that ensures that a programmer is insulated from the underlying database where the repository is stored, protecting them from changes to the database structure or content. The objects are grouped into Packages and contain a useful, extensive and well documented set of properties and methods that are intuitive to use and allow access to elements, features, diagrams and project metadata.
Automation provides a way for other applications to access the information in an Enterprise Architect model using Windows OLE Automation (ActiveX). Typically this involves scripting clients such as MS WordTM or Visual Basic, or using scripts created within Enterprise Architect using the Scripting window.
The Automation Interface provides a way of accessing the internals of Enterprise Architect models. Examples of things you can do using the Automation Interface include:
- Perform repetitive tasks, such as update the version number for all elements in a model
- Generate code from a StateMachine diagram
- Produce custom reports
- Perform ad hoc queries
Connecting to the Automation Interface
All development environments capable of generating ActiveX COM clients should be able to connect to the Enterprise Architect Automation Interface. This guide provides detailed instructions on connecting to the interface using Microsoft Visual Basic 6.0, Borland Delphi 7.0, Microsoft C# and Java. There are also more detailed steps on how to set-up Visual Basic; the principles are applicable to other languages.
|Connect to the Interface Set References In Visual Basic
Examples and Tips
Instruction on how to use the Automation Interface is provided by means of sample code. See pointers to the samples and other available resources. Also, consult the extensive Reference Section.
|Examples and Tips Available Resources Reference
Calling Executables from Enterprise Architect
Enterprise Architect can be set up to call an external application. You can pass parameters on the current position selected in the Browser window to the application being called. For instructions, go to the Call from Enterprise Architect topic. A more sophisticated method is to create Add-Ins, which are discussed in a separate section.
|Call from Enterprise Architect Enterprise Architect Add-In Model