Enterprise Architect User Guide Series Enterprise Architect Object Model This document describes the Enterprise Architect Object Model, which gives the scripter or programmer access to the underlying objects that you can use to query or manipulate a repository. Author: Sparx Systems & Stephen Maguire Date: 21/12/2018 Version: 1.0 CREATED WITH Table of Contents Enterprise Architect Object Model 8 Using the Automation Interface 11 Connect to the Interface 12 Set References In Visual Basic 18 Examples and Tips 21 Call from Enterprise Architect 25 Available Resources 28 Reference 31 Interface Overview 33 App Object 36 Enumerations 38 ConstLayoutStyles 41 CreateBaselineFlag 44 CreateModelType 45 DocumentBreak 46 DocumentPageOrientation 47 DocumentType 48 EAEditionTypes 49 EnumRelationSetType 50 ExportPackageXMIFlag 52 MDGMenus 53 MessageFlag 54 ObjectType 56 PropType 60 ReloadType 61 ScenarioDiagramType 62 ScenarioStepType 64 ScenarioTestType 65 XMIType 66 Repository Package 68 Author Class 69 Client Class 72 Collection Class 75 The AddNew Function 80 Datatype Class 88 EventProperties Class 93 EventProperty Class 95 ModelWatcher Class 97 Package Class 99 ProjectIssues Class 122 ProjectResource Class 126 ProjectRole Class 129 PropertyType Class 132 Reference Class 135 Repository Class 138 Stereotype Class 192 Task Class 196 Term Class 200 Element Package 203 Constraint Class 205 Effort Class 208 Element Class 211 File Class 242 Issue (Maintenance) Class 245 Metric Class 249 Requirement Class 252 Resource Class 256 Risk Class 260 Scenario Class 263 ScenarioExtension Class 267 ScenarioStep Class 270 TaggedValue Class 274 Test Class 278 Element Features Package 282 Attribute Class 284 AttributeConstraint Class 293 AttributeTag Class 296 CustomProperties Collection 300 EmbeddedElements Collection 302 Method Class 304 MethodConstraint Class 313 MethodTag Class 316 Parameter Class 320 ParamTag Class 325 Partitions Collection 328 Properties Class 330 TemplateParameter Class 333 Transitions Collection 336 Connector Package 338 Connector Class 340 ConnectorConstraint Class 353 ConnectorEnd Class 356 ConnectorTag Class 362 RoleTag Class 366 TemplateBinding Class 370 Diagram Package 374 Diagram Class 375 DiagramLinks Class 392 DiagramObject Class 397 SwimlaneDef Class 409 Swimlanes Class 412 Swimlane Class 415 Project Interface Package 417 Project Class 418 Document Generator Interface Package 462 DocumentGenerator Class 464 Mail Interface Package 476 MailInterface Class 477 Simulation Package 483 Simulation Class 484 Schema Composer Package 487 SchemaProperty Class 488 SchemaProfile Class 492 SchemaComposer Class 494 ModelTypeEnum Class 498 ModelType Class 499 SchemaTypeEnum Class 503 SchemaType Class 504 SchemaPropEnum Class 506 SearchType Enumeration 507 SchemaNamespace Class 508 SchemaNamespaceEnum Class 509 Code Samples 510 Open the Repository 512 Iterate Through a .EAP File 514 Add and Manage Packages 516 Add and Manage Elements 518 Add a Connector 520 Add and Manage Diagrams 523 Add and Delete Features 525 Element Extras 527 Repository Extras 535 Stereotypes 540 Work With Attributes 542 Work With Methods 545 User Guide - Enterprise Architect Object Model 21 December, 2018 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 powerful 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 meta-data. 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 Word 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 (c) Sparx Systems 2018 Page 8 of 549 User Guide - Enterprise Architect Object Model 21 December, 2018 · Generate code from a StateMachine diagram · Produce custom reports · Perform ad hoc queries Features Feature Description Connecting All development environments capable of to the generating ActiveX COM clients should Automation be able to connect to the Enterprise Interface 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. Examples Instruction on how to use the Automation and Tips Interface is provided by means of sample code. See pointers to the samples and other available resources. Also, consult the extensive Reference Section. Calling Enterprise Architect can be set up to call Executables an external application. You can pass (c) Sparx Systems 2018 Page 9 of 549 User Guide - Enterprise Architect Object Model 21 December, 2018 from parameters on the current position Enterprise selected in the Project Browser to the Architect 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. (c) Sparx Systems 2018 Page 10 of 549
Description: