Programming the Writer Configuration

When the writer is launched from rules or Java code, you can set options to tweak the writer's behavior.

Map options = new HashMap();
Model umlModel =...
umlModel.write("Enterprise Architect Application", "", options);

Programmatic Properties

The model writer can be configured.

Writing in a Package

The uri parameter of "Enterprise Architect Application" writer can be used for selecting a specific package into which the writing will start. Two uri formats are allowed:

Note that empty uri means writing in the root. Here is a sample code that shows how to write in a specific Package, using the Enterprise Architect Application Writer:
Map options = ...
Model umlModel = ...
umlModel.write("Enterprise Architect Application", "{e3b53655-c00d-4368-beda-eda6772439d7}", options);

Related tasks
Writing UML Data
Managing Ids

Related references
UML API Reference
MDAccess for MagicDraw API Reference