To integrate MagicDraw or other modeling tool into your application you should launch your application in the OSGI Framework provided by MagicDraw or other modeling tool installation. This would allow you to interact with MagicDraw or other modeling tool classes directly.

In order to launch your application in the OSGI Framework you should create you application launcher extending com.nomagic.magicdraw.commandline.CommandLine class. See Running programs in batch mode for further details. Starting MagicDraw or other modeling tool is achieved by invoking one of com.nomagic.magicdraw.core.Application.start(...) methods from your application code.

For details on how to run your application see Specifying batch mode program classpath and required system properties.