The above example shows how to create a macro that can generate a unique ID by using a gem.
To install a gem for the existing Ruby environment on your machine and use it in Macro Engine
Add the following properties to specify the home and library of JRuby in <MagicDraw>/bin/mduml.properties under JAVA_ARGS section (assuming you have JRuby installed in C:/jruby-1.5.3 on your machine).
The command in this section should run in <MDdir>/plugins/com.nomagic.magicdraw.automaton/engine.
If you have a whitespace in the property file path, you need to type a double quote to wrap both the property and its value, for each property, for example:
“-Djruby.home=C:/my white space/jruby-1.5.3" “-Djruby.lib=C:/my white space/jruby-1.5.3/lib”