Displaying or Changing Flags by Scripting

You can display or change flags by scripting.

In this scenario, you display and change the flag Advanced.ActivateSmartDelete using the Modelica Scripting window

Notes:
  • For more information working with the Modelica Scripting window, see Working with the Modelica Scripting Window.
  • You can also set flags in scripts or in Modelica Text. For general script handling, see About Scripting. For working with Modelica Text, see Displaying and Editing Modelica Text.
    Important: If you set flags in scripts or in Modelica text, you must conclude the line with semicolon, for example:
    Advanced.ActivateSmartDelete=1;

    Compare with Step 3 below.

  • You can also display and change flags using a dialog box, see Working with Dymola Flags. You may see this dialog box as a complement, there are some valuable features in that dialog box, for example:
    • You can filter flags.
    • Flags that have another value that the default one are indicated by yellow background.
    • Flags that are saved between sessions are displayed in italics.

  1. From the Behavior Tools section of the action bar, click Modelica Scripting .
    The Modelica Scripting window appears.

  2. To display the value of the flag Advanced.ActivateSmartDelete, type it in the lower line (command input line) of the Modelica Scripting window and press Enter.
    The following appears in the main pane in the window, given the value of the flag is 2:
    Advanced.ActivateSmartDelete
     = 2
  3. To change the value of the flag to 1, type, in the command input line, Advanced.ActivateSmartDelete=1 and press Enter.
    The following appears in the main pane in the window:
    Advanced.ActivateSmartDelete=1

    The value of the flag is now changed, you can control this by repeating Step 2.

    Tip: You can click in the command input line and use "arrow up" to display previously executed commands in the command line.