.. comment all inline tags to start with _gs_md_ .. index:: pair: MagicDraw ; Getting Started .. _gs_md_top: *************************************************** Setting up with MagicDraw 18.4 for use with STEPlib *************************************************** .. include:: /pages/common/pageunderconstruction.txt :start-line: 3 .. contents:: :depth: 2 .. todo:: Options->Environment->General->Save/Load->Save UUID ============ Introduction ============ This page explains how to set up MagicDraw for use when developing STEP standards using STEPlib. .. note:: Before work can start (particually for new projects) it may be necessary for the :ref:`Team Leader to complete some tasks`. ---------------- Software version ---------------- MagicDraw version 18.4 SP1 (with MERGE plugin) is used for STEPlib and this documentation ----------- Prerequists ----------- This assumes that the STEPlib Git repository has already been cloned as described in |git developer|. ============= Configuration ============= .. contents:: The steps are: :local: :depth: 2 :backlinks: top .. index:: pair: MagicDraw ; Environment .. _gs_md_env: ----------- Environment ----------- .. _gs_md_path: Path variables ^^^^^^^^^^^^^^ A path variable (Options->Environment->Path Variables) STEPlib needs to be added and set to the path to the STEPlib folder in the cloned Git project. .. figure:: /images/howto/gs_md_STEPlibPath01.png :scale: 100% Setting the STEPlib path environment variable To ensure relative paths from this start point are captured correctly this should be used whenever exporting from MagicDraw (e.g. when separating out a :term:`CTC` into a separate file). This will enable the model to be transferred to other developer's machines. .. _gs_md_saveuuid: Save with UUID ^^^^^^^^^^^^^^ The environment needs to be set to save with UUID (Options->Environment->General->Save/Load->Save UUID). .. figure:: /images/howto/gs_md_uuid.png :scale: 100% Setting Save with UUID .. _gs_md_dictionary: Dictionary English-GB ^^^^^^^^^^^^^^^^^^^^^ ISO standards use the GB English dictionary (officially *The Concise Oxford Dictionary of Current English*). The default for |MD| is US English which should be changed. .. figure:: /images/howto/gs_md_en_gb.png :scale: 100% Setting Dictionary to GB English #. Select Options > Environment #. Select the "Spelling" #. Check that English GB is in the list of options (lower panel). If it is not, a copy should be in the same installation folder as the other dictionries and can simply be added. If not, then a copy should be obtained from the internet #. In the Spelling panel, change the Dictionary option to use this English GB dictionary .. index:: pair: MagicDraw ; Memory Error .. _gs_md_heap: Increase Memory Allocation ^^^^^^^^^^^^^^^^^^^^^^^^^^ If you receive an error message saying your modeling tool is out of memory, the application does not have enough memory to operate. You can change the amount of allocated memory directly in the error message dialog or by changing modeling tool properties. .. figure:: /images/howto/gs_md_memory_error.png :scale: 100% Memory Error message If you computer has enough memory (see below) the recommended value for **Xmx** is 4000. Default is 1200. .. warning:: You will need admin rights to change these settings The following is an extract from the |MD| documentation. .. note:: .. hint:: **Memory allocation concept** Memory allocation for the product is the same as Java heap size. To increase the amount of memory allocated for the product, simply increase the Java heap size. **Recommended amount of allocated memory** The amount of allocated memory (or Java heap size) should be set to less than the available physical RAM on your computer. To calculate the approximate amount of memory you should allocate, subtract the amount of memory taken by any other processes that will run concurrently with your modeling tool from the total amount of RAM in your computer. Otherwise your JVM process will likely swap, and that will slow down the application. .. warning:: **Do not allocate too much memory** If you increase the Java heap size too much, you will get an error message that the Java virtual machine cannot be created, and a modeling tool will not start. The maximum theoretical heap limit for the 32-bit JVM is 4G. In practice, the limit can be much lower, due to various additional constraints such as available swap, kernel address space usage, memory fragmentation, and VM overhead. * On most 32-bit Windows systems the maximum heap size ranges from 1.4G to 1.6G. * On 32-bit Solaris kernels the address space is limited to 2G. * On 64-bit operating systems running the 32-bit VM, the max heap size can be higher, approaching 4G on many Solaris systems. * On 64-bit VMs, the maximum Java heap size is limited only by the amount of physical memory and swap space your system provides. **Changing the amount of allocated memory** You can set the amount of memory allocated for your modeling tool either in the Environment Options dialog or in the modeling tool properties file. To change the amount of allocated memory in the Environment Options dialog 1. In the main menu of your modeling tool, go to Options > Environment. The Environment Options dialog opens. 2. Expand the General options group on the left side of the dialog, and select the Memory Settings category. 3. In the option specification area on the right side of the dialog, change the value of the Maximum Heap Size or Thread Stack Size option. To change the amount of allocated memory in the modeling tool properties file 1. Go to \bin and open the modeling tool properties file. 2. In the JAVA_ARGS line, change the value of the -Xmx or -Xss property. For example, change the -Xmx800M to -Xmx1066M. 3. Save and close the file. 4. Restart your modeling tool. .. _gs_md_seperspective: ------------------------------- Set System Engineer Perspective ------------------------------- The SysML tools are accessed when using the "System Engineer" perspective which is not the default so needs to be set using **Options > Perspectives > Perspectives**. .. figure:: /images/howto/gs_md_seperspective.png :scale: 100% Change Perspective to "System Engineer" .. _gs_md_macros: ----------- Load Macros ----------- Some macros have been developed to aid developement. These are stored in the STEPlib\utils\MagicDraw folder. #. Open **Tools** > **Macros** > **Organize Macros** #. Select **Add** #. Enter a name (e.g. Get UUID) #. Select the macro language (e.g. JavaScript) #. Browse to select the file (e.g. STEPlib\\utils\\MagicDraw\\getUUIDmacro.js) #. add an arguments needed by the macro (e.g. none) #. optionally add an unused short cut (e.g. ctrl-alt-shift u) More details can be found in the |MD help macro|. .. _gs_md_openmodel: ----------------- Opening the model ----------------- .. contents:: The steps are: :local: :depth: 1 :backlinks: top Before opening the model, the :ref:`STEPlib environment variables ` and :ref:`Perspective ` must be set. .. _gs_md_opentopmodel: Open the top level model ^^^^^^^^^^^^^^^^^^^^^^^^ The top level model is STEPlib.mdzip and is stored in the STEPlib/dvlp folder. .. figure:: /images/howto/gs_md_openmodel01.png :scale: 100% Open STEPlib.mdzip in |MD| Several "Loading..." windows open, and then the model as shown below. .. _gs_md_fig_openedModel: .. figure:: /images/howto/gs_md_openmodel02.png :scale: 100% STEPlib.mdzip opened in |MD| .. _gs_md_opensubmodel: Open readonly sub models ^^^^^^^^^^^^^^^^^^^^^^^^ The SysML model in STEPlib is split between several connected "projects" in separate files. In |MD| each project needs to be open to be editable. The default behaviour is to open the projects in readonly, so on first opening most of the content is readonly (greyed out) as shown in :numref`gs_md_fig_openedModel`. A sub-project is opened using the "Project Usages" dialog which is available from the tree on the M-R menu for single projects (see :numref:`gs_md_projectusage01`). Alternatively the settings for multiple projects can be controlled from the "Options > Project Usages" (see :numref:`gs_md_projectusage02`). These are illustrated below. For more details see |MD help mup|. .. _gs_md_projectusage01: .. figure:: /images/howto/gs_md_projectusage01.png :scale: 100% Opening a project from the tree .. _gs_md_projectusage02: .. figure:: /images/howto/gs_md_projectusage02.png :scale: 100% Options dialog for Opening multiple projects ----------------- Saving the model ----------------- .. todo:: all of this section --------------------- Commiting the changes --------------------- This is covered in the |git developer|. .. todo:: all of this section .. sectionauthor:: |Judith Crockford| .. include:: /keywords.rst