If you are planning to import and export your resources with the Resource Manager, you should read this section. For importing resources to your modeling tool, the resource manager descriptor file should be created. In this section you will find information about the descriptor file naming, location, and a sample of this file. 

For more information about importing resources with Resource Manager, see MagicDraw UserManual.pdf.

 

Resource Manager descriptor file naming

The Resource Manager descriptor file has a specific naming. The structure of the name is MDR_<type>_<plugin name>_<plugin id>_descriptor.xml.  For example, MDR_Plugin_CustomPlugin_3001_descriptor.xml.

 

  All spaces are replaced with the underscore symbol “_“.

 

Resource Manager descriptor file location

The file location is <modeling tool installation directory>\data\resourcemanager.

 

Resource Manager descriptor file content and sample

This section presents a basic sample of the Resource Manager descriptor file structure. This sample represents a plugin distribution, which also includes a custom diagram, profile, template, sample, and documentation.

You can also distribute custom diagrams, profiles, templates, or samples separately, you only need to change the “type“ value.

<resourceDescriptor 
    critical="false" 
    date="2007-12-24+02:00" 
    description="My Plug-in"
    homePage="http://www.nomagic.com" 
    id="3001"
    mdVersionMax="higher" 
    mdVersionMin="15.0" 
    name="CustomPlugin" 
    product="CustomPlugin" 
    type="Plugin">
 
    <version human="1.0 beta" internal="1" resource="10"/>
    <provider name="No Magic" />
 
    <edition>Enterprise</edition>
    <edition>Architect</edition>
    <edition>Standard</edition>
    <edition>Professional Java</edition>
    <edition>Professional C++</edition>
    <edition>Professional C#</edition>
    <edition>Professional ArcStyler</edition>
    <edition>Reader</edition>
    <edition>OptimalJ</edition>
 
    <installation>
        <file from="data/defaults/data/diagrams/CustomDiagram/descriptor.xml" to="data/defaults/data/diagrams/CustomDiagram/descriptor.xml" />
        <file from="profiles/CustomProfile.xml.zip" to="profiles/CustomProfile.xml.zip" />
        <file from="templates/CustomTemplate.xml.zip" to="templates/CustomTemplate.xml.zip" />
        <file from="samples/CustomPluginSample.mdzip" to="samples/CustomPluginSample.mdzip" />
        <file from="manual/CustomPluginManual.pdf" to="manual/CustomPluginManual.pdf" />
        <file from="plugins/customPlugin/*.*" to="plugins/customPlugin/*.*" />
        <file from="data/resourcemanager/MDR_Plugin_CustomPlugin_3001_descriptor.xml" to="data/resourcemanager/MDR_Plugin_CustomPlugin_3001_descriptor.xml" />

    </installation>
</resourceDescriptor>

The following table describes the terms used in the sample:

Element

Description

id

A unique plugin id. id is used to form a descriptor file name. This id must be unique. To prevent duplicates, use a number starting from 3000 or contact the No Magic support at http://www.nomagic.com/support.html.

name

A plugin name. A name is used to form a descriptor file name. The plugin name must be unique between all program resources.

product

A product name. Used only for the “Plugin (commercial)” resource type.

type

A type may be one of the following types: Custom Diagram, Plugin, Plugin (commercial), Profile, Sample, Template.

version resource

This number is used to identify the resource build/release. For example, a new resource build must be released, while the resource human and internal versions should not change. A suggested value is a version internal value multiplied by 10. version resource should be a number.

version internal

This version number is not visible to the user and may be used for an internal count. version internal should be a number.

version human

A human readable version number of the resource. This version number is visible to users. The version human number may consist of numbers and/or words.

edition

Supported program editions.

installation

installation includes files, which will be copied from the custom plugin archive to the program folder.

Do not use "*.*" ! If a file name includes “*.*“, all defined files will be removed when uninstalling the plugin. For example, if "samples/*.*" is defined, all files from the “samples” folder will be removed after uninstalling the resource. 

criticalIf the resource is selected as critical, it cannot be removed because MagicDraw does not allow this.