$project is a project reference enabling a template to return the project information.
Returns a project name.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.lang.String | A project name. |
Gets a project title.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.lang.String | A project title. |
Gets a project filename.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.lang.String | A project filename. |
Gets a project filename extension.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.lang.String | A project filename extension. |
Get a project directory name.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | - | - | - |
Return | - | java.lang.String | A project directory name. |
Returns a list of version information from an open Server project.
Name | Type | Description | |
---|---|---|---|
Return | - | java.util.List<ProjectVersion> | A list of com.nomagic.magicdraw.magicreport.tools.ProjectsVersion. |
Version information consists of the following attributes:
|
Following is the sample code.
Current version : $project.version All version: ---------------- #foreach ($version in $project.versionList) Date : $version.date Number : $version.number Number as String : $version.numberAsString User : $version.user Comment : $version.comment ---------------- #end |
Returns a file type. A file type is one of the following values:
Name | Type | Description | |
---|---|---|---|
Return | - | int | The value of a file type. |
Returns all existing diagrams stored in a particular project.
Name | Type | Description | |
---|---|---|---|
Return | - | java.util.Collection | A collection of diagram instances. |
Returns existing diagrams of a given type stored in a particular project.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | type | java.lang.String | A diagram type. |
Return | - | java.util.Collection | A collection of diagram instances. |
#set($classDiagram = $project.getDiagrams("Class Diagram")) #foreach($cl in $classDiagram) $cl.name #end |
Returns all existing presentation diagrams stored in a particular project.
Name | Type | Description | |
---|---|---|---|
Return | - | java.util.Collection | A collection of diagram views. |
Returns all existing presentation diagrams of a given type stored in a particular project.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | type | java.lang.String | A diagram type. |
Return | - | java.util.Collection | A collection of diagram views. |
#set($classDiagram = $project.getPresentationDiagrams("Class Diagram")) #foreach($cl in $classDiagram) $cl.name #end |
Returns the remote or non-remote state of a project.
Name | Type | Description | |
---|---|---|---|
Return | - | java.lang.Boolean | Return true if a project is a remote project, otherwise false. |
Returns true if that particular project was modified after it had been saved or loaded.
Name | Type | Description | |
---|---|---|---|
Return | - | java.lang.Boolean | Return true if a project was modified after it had been saved/loaded, otherwise false. |
Returns an element with a given ID.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | ID | java.lang.String | An element ID. |
Return | - | com.nomagic.magicdraw.uml.BaseElement | An element with a given ID or null if the element with such ID is not registered in the project. |
#set($ele = $project.getElementByID("_9_0_62a020a_1105704887361_983947_8206")) $ele.name #ele.humanType |
Returns a collection of all element IDs in a project.
Name | Type | Description | |
---|---|---|---|
Return | - | java.util.Collection | A collection of all element IDs in a project. |
Returns the XMI version of a project.
Name | Type | Description | |
---|---|---|---|
Return | - | int | An XMI version. |
Return a project version number.
Name | Type | Description | |
---|---|---|---|
Return | - | long | A project version number. |
Returns a model (the root container of all model structures).
Name | Type | Description | |
---|---|---|---|
Return | - | com.nomagic.uml2.ext.magicdraw.auxiliaryconstructs.mdmodels.Model | A model. |
$project.getModel() is deprecated since MagicDraw 18.2, please use $project.getPrimaryModel() instead |
Returns the primary (main) model of the project (not including the ones from modules (attached projects)).
Name | Type | Description | |
---|---|---|---|
Return | - | com.nomagic.uml2.ext.magicdraw.classes.mdkernel.Package | The primary model of the project. |
Returns a list of models in the project (the primary model of the project and all the models of the modules(attached projects)).
Name | Type | Description | |
---|---|---|---|
Return | - | Java.util.List | A list of models. |
Name | Type | Description | |
---|---|---|---|
Parameter(s) | auxiliary | boolean | Returns auxiliary resources only if this value is True. Default is False. |
Return | - | java.util.Collection | A list of com.nomagic.magicdraw.core.modules.ModuleDescriptor |
Returns a list of shared modules from a specified module.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | module | com.nomagic.magicdraw.core.modules.ModuleDescriptor | A module. |
Return | - | java.util.Collection | A list of com.nomagic.magicdraw.core.modules.ModuleDescriptor. |
This function returns the list of used server modules as well as auxiliary resources.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | auxiliary | boolean | Returns auxiliary resources when this value if True. Default is false. |
Return | - | java.util.Collection | A list of com.nomagic.magicdraw.core.modules.ModuleDescriptor. |
This function returns a list of used local modules as well as auxiliary resources.
Name | Type | Description | |
---|---|---|---|
Parameter(s) | auxiliary | boolean | Returns auxiliary resources when this value if True. Default is false. |
Type | - | java.util.Collection | A list of com.nomagic.magicdraw.core.modules.ModuleDescriptor. |
This function returns a list of auxiliary resources.
Name | Type | Description | |
---|---|---|---|
Type | - | java.util.Collection | A list of com.nomagic.magicdraw.core.modules.ModuleDescriptor. |
#foreach ($module in $project.getModuleList()) name : $module.representationSpring description : $module.description version : $module.version required version : $module.requiredVersion shared module : #foreach ($child in $project.getSharedModule($module)) - $child.representationString#end=========================#end |