Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Right-click the empty space on the diagram pane and open the Specification window.
  2. On the left side of the dialog, select Traceability and click Create.On the left side of the  Expression dialog opens.
  3. Select Create operation → Script, click Create operation and select Script operation.

    Note

    If you cannot see the Script operation under Operations, make sure the Expert mode is enabled.

    Image Added

  4. Specify the Name for the derived property.
  5. Set the Type as String.
  6. Specify the Operation Name.
  7. From the Language drop-down list, select JavaScript Rhino.
  8. Insert the following script as the Body

    Code Block
    var prj = com.nomagic.magicdraw.core.Application.getInstance().getProject().getPrimaryProject();
    var ver = com.nomagic.magicdraw.core.ProjectUtilities.getVersion(prj);
    ver.getName();

  9. Click OK.

...