MagicDraw TWRT Documentation

Publishing Cameo Collaborator documents is the simplest way to present models to stakeholders, sponsors, customers, and engineering teams. This chapter explains how to publish documents from the command line, which is useful if you want to publish them periodically, e.g., once a day or during non-business hours to save time.

Prerequisites

Recommendations

  • If you intend to publish a large model, increase the default JVM heap size of the Cameo Collaborator Publisher plugin as follows:
    1. Go to the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory and open the publish.properties file.

    2. Increase the -Xmx value, e.g., -Xmx4000M. It is recommended to set a larger heap size value than the one defined for your modeling tool.

    3. Save and close the file.

  • Depending on the size of the model you intend to publish, allocate a sufficient amount of memory to your modeling tool:
    • 2 million element model - 24 GB of RAM

    • 1 million element model - 15 GB of RAM

    • 500k element model - 7 GB of RAM

Publishing tips

  • To change the number of decimals displayed in Cameo Collaborator documents, in the main menu, go to Options > Project Options and specify the Decimal Places option. The setting is remembered and used for other documents published from the project.
  • You can specify the diagram export options, such as dimensions and building time (the latter applies only to tables and matrices). To learn more, refer to Diagram image export.


To publish a Cameo Collaborator document from the command line interface


  1. Open the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher/PowerBy_template.properties file.
  2. Read the comments in the file and specify the publishing options.

  3. Open the command line interface.
  4. Go to the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory containing the executive file for model publishing.

  5. Execute the following command:

    • On Windows

      publish.exe properties=<modeling_tool_installation_directory>\plugins\com.nomagic.collaborator.publisher\PowerBy_template.properties
    • On OS X or Linux

      ./publish properties=<modeling_tool_installation_directory>/plugins/com.nomagic.collaborator.publisher/PowerBy_template.properties


After completing the steps above, yo
ur model is published to Cameo Collaborator. If you want to publish the same model frequently, you do not need to do it manually every time. Instead, schedule publishing as a background task to save time.

Scheduling to publish a document

If you need to publish your models periodically and/or during non-business hours, you can schedule them to be published automatically. The following procedures describe the scheduling process on Windows and Linux operating systems.
 

To schedule a publishing task on Windows


  1. Open the Task Scheduler from the Start menu of your Windows computer and select the option to create a basic task.
  2. Type the task name, an optional description, and click Next.
  3. Select how often you want the task to reoccur and click Next.
  4. Specify when you want the task to start and click Next.
  5. To schedule the publishing to start automatically, select the Start a program radio button and click Next.

  6. Click the Browse button, go to the <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher directory, and open the publish.exe file.

  7. In the Add Arguments (optional) box, type properties=<modeling_tool_installation_directory>\plugins\com.nomagic.collaborator.publisher\template.properties and click Next.



  8. Click Finish.


To schedule a publishing task on Linux


  1. Connect to the remote server using SSH, or open the terminal directly.
  2. Type the following command to open the crontab file with the default text editor:

    # crontab -e
  3. Using the Cron syntax create a cronjob to run the model publishing task once a day at midnight:
    0 0 * * * <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher/publish.sh -properties PowerBy_template.properties
  4. Save the crontab file.


After completing the steps described above, your model is published automatically on a regular basis at a specified time.

  • No labels