Skip to content

Command Line Actions

Beöthy Bence edited this page Jul 23, 2019 · 4 revisions

MD Command Line Actions

MagicDraw API gives an opportunity to define MagicDraw Command Line Actions.

Create a Command Line Action

To define a Command Line Action the class needs to implement CommandLineAction interface and it should be registered in the CommandLineActionManager.

The registered Command Line Action is executable from the command line in headless mode and it can handle command line arguments as well.

Python Code Generation Example

There is a Command Line Action example in the repository called CodeGenRunner. It runs the Plugin's code generation Action on a baked-in example model.

It is runnable from a Gradle task. The Gradle task is called runCodeGen. It is executable on Jenkins as well with a parametrized build. Check the related wiki page for more detail.

Clone this wiki locally