Help:- Create the SysMLindexpreviousnextupdownside index

Once the Business Object model is defined, then it needs to be mapped to PLCS. This is achieved by use of Templates. First define the business templates required. See Template development for details on creating templates.

All templates that are used by the DEX need to be explicitly listed in the <plcs_info_model.model> element within the dex.xml file.

Having created the templates, their use in representing the Business Object Model needs to be defined. This is done be creating a set of SysML Parametric Diagrams that show the use of the templates. These are stored in the "PLCS PSM Representation" section of the DEX, which is the <plcs_info_model> element within the dex.xml file.

All the DEXs and templates that are defined within a Context are specified using SysML. Hence it is necessary to set up the SysML environment.

In order to create the SysML PLCS PSM Representation Diagrams, a SysML package needs to be set up.

This comprises the following steps using: MagicDraw 17.0 sp4

  1. Launch MagicDraw 17 and select File -> Open Project...
  2. Browse to plcslib\data\contexts\<<Context>>\dvlp\
  3. Open plcslib\data\contexts\<<Context>>\dvlp\index.mdxml
    NOTE    If you are warned that MagicDraw cannot find a number of modules then your MagicDraw Environment is not set up correctly. These are the XMI modules for the PLCS PSM and the templates. They are not found because the modules are referenced by relative paths using a path variable. Cancel the option to manually load each of the modules. Select Options-> Environment Select PathVariables Add a new path variable named PLCSlib.data and set the value to your local plcslib\data folder Exit MagicDraw WITHOUT saving the project!
  4. If no DEXs directory exists under Data/<<Context>> (id the is the first DEX created in this context) add a new package for the DEXs. Under Containment tab right click on Data/<<Context>> and select New Element -> Package. Name the package DEXs.
  5. Add a new package for the DEX representation you are to create. Under Containment tab right click on Data/<<Context>>/DEXs and select New Element -> Package. Name the package <<DEX>>.
  6. Create a SysML Block Definition Diagram within your <<DEX>> package, named <<DEX>>DEXPlcsRep.
    • Select your package in the Containment tree under Data/<<Context>>/DEXs/<<Package>>;
    • Right click and select New Diagrams->SysML Diagrams->SysML Block Definition Diagram
    • Type "<<DEX>>DEXPlcsRep" as the SysML Block Definition Diagram name in Containment tree view;
    • Set the diagram size to "Autosize" in order to reduce the size of the image.
      • Right click on diagram, select "Diagram Properties"
      • size to "Autosize" to "true"
    • Close the Block Definition Diagram.
  7. Select the dex package you have just created, named <<Dex>>, and execute File->Export To->Module Select "OK" in the resulting dialogue box. (If other dialogue boxes appear select "No".) In the resulting file chooser, browse to plcslib\data\contexts\<<Context>>\dexs\<<DEX>>\dvlp\ and save the new dex file as <<Context>><<DEX>>DEXPlcsRep.mdxml.
    NOTE    The filetype should be changed to "MagicDraw File Types (.mdxml)" instead of the default .mdzip format.
  8. Save the project, overwriting the plcslib\data\contexts\<<Context>>\dvlp\index.mdxml
  9. Close the project.
  10. Edit the project file (plcslib\data\contexts\<<Context>>\dvlp\index.mdxml) to replace the absolute module path to the newly created module with a relative module path using the path variable PLCSlib.data. i.e. replace as shown below:
    <mdElement elementClass='FileProperty'>
              <value>D:\Users\CVSroot\plcslib\data\contexts\<<Context>>\dexs\<<DEX>>\dvlp</value>
              <selectionMode xmi:value='0'/> <displayFullPath
              xmi:value='true'/> <useFilePreviewer xmi:value='false'/>
              <displayAllFiles xmi:value='true'/>
              <fileType>FILE_TYPE_ANY</fileType>
              </mdElement> 
    with
    <mdElement
                elementClass='FileProperty'>
                <value>&lt;PLCSlib.data&gt;\contexts\<<Context>>\dexs\<<DEX>>\dvlp</value>
                <selectionMode xmi:value='0'/> <displayFullPath
                xmi:value='true'/> <useFilePreviewer xmi:value='false'/>
                <displayAllFiles xmi:value='true'/>
                <fileType>FILE_TYPE_ANY</fileType>
                </mdElement> 
    NOTE    This has been reported to and acknowledged by NoMagic as a BUG and should be fixed in later releases.
    NOTE    Ensure that the editor used to perform this edit is a "dumb" editor and does not change the formatting of the file. Some editors have been found to alter the formatting resulting in the file becoming corrupted from a MagicDraw perspective.
Issue reporting