Programming the Reader Configuration
When the reader is launched from rules or Java code, you can set options to tweak the reader's behavior.
Map options = new HashMap();
options.put(MagicDrawOptions.OPTION_OVERRIDE_STANDARD_PROFILES, Boolean.TRUE);
Model umlModel =...
umlModel.read("MagicDraw", "c:\path.mdzip", options);
Programmatic Properties
The model reader can be configured.
MagicDrawOptions.OPTION_MAGIC_DRAW_DIR
- magicdraw.dir
- Set to the MagicDraw install directory, determines whether "profiles" and "modelLibraries" directories should be used to resolve proxies - from MagicDraw 2022.
- Default:
null
.
This option overrides the Option "MAGIC_DRAW_INSTALL_PATH"", which is deprecated.
MagicDrawOptions.OPTION_MAGIC_DRAW_LOG
- magicdraw.log
- Set to true, print the debug/info/warning/error in the logger.
- Default:
true
MagicDrawOptions.OPTION_MAGIC_DRAW_UAF
- magicdraw.uaf
- Set to true, write a UAF model, set to false, write a UPDM model.
- Default:
true
- UAF
MagicDrawOptions.OPTION_MAGIC_DRAW_VERSION
- magicdraw.profile.version
- Determines the MagicDraw profiles version that has to be loaded - from MagicDraw 19.0.
- Default:
LATEST
MagicDrawOptions.OPTION_OVERRIDE_STANDARD_PROFILES
- magicdraw.override.standard
- Determines whether the OMG's standard profile are overriden by the MagicDraw profile.
This is working only for the SysML Profile.
- Default:
false
MagicDrawOptions.OPTION_MAGIC_DRAW_USED_PROJECTS_DIR
- magicdraw.usedProjects.dir
- Use the directories paths in parameter to resolve proxies. Paths are separated by a comma - from MagicDraw 2022.
If the proxy is in several places, the first corresponding path of the property "magicdraw.usedProjects.dir" will be used.
- Default:
false
Reading UML Data
MDAccess for UML API Reference
MDAccess for MagicDraw API Reference