On this page

With the Watch pane, you can easily monitor selected properties and their expressions with runtime values while debugging. The Watch pane displays a flat list of selected runtime values during model simulation.

The Watch pane with expressions and their selected runtime values during model simulation.

For any projects with the default Simulation window settings, the Watch window will be opened by default in the same group as the Variables and Breakpoints as the last pane. If the user saves the project, the Watch window properties will be kept according to the recent settings like the other panes. Also, you can manually open it by clicking  in the Simulation toolbar. This pane contains two columns:

  • Name/Expression that can be edited. When you add a Watch item, it will be shown in this column.
  • Value is editable if it represents value property, but not an expression. When you add a Watch item, its value will be in this column. The Value column will be highlighted in red or green the same as in the Variables pane.

Note

  • If the Simulation toolbar is locked (in Monte-Carlo and Trade Study simulation), the Watch pane will be disabled to maximize the performance.
  • When adding items at runtime, the value is evaluated and updated for all property changes and state changes on each clock tick. However, if you add properties before runtime, the value is not be evaluated until the simulation runs.
  • If the added item is not found, the value is displayed as "Not found!" in red unless you correct or remove the selected property.
  • If the added item has no value, the value is displayed with <blank>.
  • If the added item has multiplicity with <blank>/0 value, the value is displayed with []/[0].

You can add Watch items to the Watch pane using the following:


Adding Watch items using the Variables pane


To add Watch items using the Variables pane


  • In the Variables pane, right-click the property you want to add and select Add Watch.


Adding Watch items using the Console pane


To add Watch items using the Console pane


  1. In the input box (>>) of the Console pane, type properties and expressions you want to add to the Watch pane.
  2. In the Console pane toolbar click . The properties and expressions in the input box (>>) are added to the Watch pane. Also, the simulation automatically saves the selected language in the list box.


Adding Watch items using the Watch pane


To add Watch items using the Watch pane


  1. Do one of the following:
    • In the Watch pane toolbar, click .
    • In the Watch pane, click the first blank row.
  2. Type the property or expression you want to add.

Note

  • You can add a name of a property without using the root object because the context of the Watch pane is the main root context.
  • A name of Type can also be used, if the name of a property does not exist, e.g., spacecraft.telecom.ma = 35.
  • Multiplicity used will be shown as a flat list of an array of strings, e.g., Trade-Study.MaxEfficiency.x = [0.4761, 0.4761,…, 0.4237].
  • You can specify an index of Multiplicity starting at 1, e.g., Trade-Study.MaxEfficiency.x[1] = 0.4761.


Adding Watch items using the SelectPropertiesConfig stereotype


To use the «SelectPropertiesConfig» stereotype as a predefined list of properties and add it to a Simulation Configuration


  1. Create a Simulation Configuration diagram.
  2. Add a «SelectPropertiesConfig» and «SimulationConfig» to the diagram.
  3. Set Name, Represents (=object), and Value (=properties) of the «SelectPropertiesConfig».
  4. Set Watch Properties (=«SelectPropertiesConfig») of the «SimulationConfig».

    Note

    The Watch Properties will be shown in Expert & All view mode.
  5. When running the «SimulationConfig», the Watch pane will append the properties populated from «SelectPropertiesConfig». If some properties already exist, they will not be added to the Watch pane.


Adding Watch items using an Internal Block or Parametric Diagram

You can add all kinds of properties (value, part, constraint), constraint parameters, and ports to the Watch pane directly from an Internal Block or Parametric Diagram.

You can only use this method if the Internal Block or Parametric Diagram context is the same as the simulation context, or if the diagram context is the first level of the simulation context structure.


To add Watch items using an Internal Block or Parametric Diagram


  1. Run the simulation.
  2. In an Internal Block or Parametric Diagram, right-click a property, constraint parameter, or port and select Simulation > Add to Watch.


Editing and removing Watch items

You can edit and remove any items by selecting the Name/Expression column on the Watch pane.


To edit a Watch item


  • Click an item to edit and press ENTER.


To remove Watch items from the Watch pane


  • Do one of the following:

    • To remove a single Watch item, select the item you want to remove and click .

    • To remove all Watch items, click .