MagicDraw registers a custom URL protocol handler mdp:// for loading resources (icons) from MagicDraw or plugins jars/classpath. Resources can also be loaded from attached files in an opened project. 

Usage samples:

  • Use the mdp protocol in the HTML based model element documentation to point to some image from a plugin jar.
  • Use the mdp protocol in the HTML based model element documentation to point to some attached image from a project.

 

URL syntax

mdp://resource/

Use the "resource" host to load resources from jars/classpaths. For example, to load the activitydiagram.png icon from MagicDraw jar, use such URL:

mdp://resource/com/nomagic/magicdraw/icons/diagrams/activitydiagram.png
mdp://attachedFile/

Use the "attachedFile" host to load resources from the attached file into the active project. For example, to load the icon from the attached file element with ID "_18_2_8ca0285_1436339188295_24687_13288", use such URL:

mdp://attachedFile#_18_2_8ca0285_1436339188295_24687_13288