Saving the Plot Window Setup as a Modelica Command in the Model

You can save the plot window setup as a Modelica command in the model.


Before you begin: Create a plot window. For more information, see Creating Plots.
  1. To save a plot window as a Modelica command in the model, right-click in it and select Tools > Export plot definition to current model.
  2. In the dialog box that appears, do the following:
    1. In the Description field, enter the name of the command.
    2. Optional: To save the plot window setup as a standard Figure item in the Modelica annotation Documentation of the model, you can activate Use standard Modelica plot setup.
    3. Optional: To ensure that the model is simulated before executing the command, you can activate Simulation.
    4. Optional: To automatically create the plot window after simulation, you can activate Automatically run after simulation.

    Note: You can use this dialog box to create Modelica commands from scripts and functions. For more information, see Associating a Modelica Command with a Model.

  3. To later retrieve the plot window, you can do it in two ways:
    • You can use the Variable Browser:
      • For a plot window not saved in the Figure format: From the Variable Browser, right-click any signal and select Predefined Actions > Commands from Model > <PlotCommandName> .
      • For a plot window saved in the Figure format: From the Variable Browser, right-click any signal and select Predefined Actions > Plot Figure > <PlotCommandName> .
    • You can use the Modelica Commands dialog:
      1. From the Behavior Tools section of the action bar, click Modelica Commands .
      2. Select the plot window command and click:
        • For a plot window not saved in the Figure format, click .
        • For a plot window saved in the Figure format, click .
      Note: You can also access the command Modelica Commands from any of:
      • The App Options panel.
      • The Action Pad panel.