On this page

In 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 pane will be opened by default in the same group as the Variables and Breakpoints as the last pane. If you save the project, the Watch pane properties will be kept according to the most recent settings, the same as the Variables and Breakpoints panes. Also, you can manually open it by clicking  in the Simulation toolbar. This pane contains two columns:

  • Name/Expression: When you add a Watch item, it will be shown in this column. Names and expressions can be edited in this column.
  • Value:  When you add a Watch item, its value will be displayed in this column. The Value can be edited if it represents a value property.  It cannot be edited if it represents the result of an expression. The Value column will be highlighted in red or green the same as in the Variables.

You can also display the Show Requirement and  Show Margin  columns and configure filtering by clicking  at the top-right corner.


The Watch pane with Requirement and Margin columns.

Note

  • If the Simulation toolbar is locked (i.e., in the Monte-Carlo and Trade Study simulation), the Watch pane will be disabled to maximize 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 as <blank>.
  • If the added item has multiplicity with <blank>/0 value, the value is displayed as []/[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 the 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 the name of a property without using the root object because the context of the Watch pane is the main root context.
  • You can also use Type if the name of a property does not exist (e.g., spacecraft.telecom.ma = 35).
  • Multiplicity 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 Select Properties Config 


To use the Select Properties Config as a predefined list of properties and add it to a Simulation Configuration


  1. Create a Simulation Configuration diagram.
  2. Add a Select Properties Config and Simulation Config to the diagram.
  3. Set Name, Represents, and Value of the Select Properties Config.
  4. Set Watch Properties of the Select Properties Config.

    Note

    The Watch Properties will be shown in the Expert & All view mode.
  5. When running the Simulation Config, the Watch pane will append the properties populated from Select Properties Config. If there are existing properties, they will not be added to the Watch pane.


Adding Watch items using an Internal Block or Parametric Diagram

You can add many 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 .

Adding watch items to a new Select Properties Config using the Watch Pane


To add the watch items to a new Select Properties Config using the Watch Pane


  1.  In the watch pane toolbar, click



  2. From the Select Owner dialog, choose the package where you want to save the new Select Properties Config with exported properties from a watch pane and click OK.

You can find the exported watch list in the Containment Tree under the selected package.

Adding new watch items to the existing Select Properties Config using the Watch Pane


To add the new watch items to the existing Select Properties Config using the Watch Pane


  • Run the simulation using the Simulation Config with specified Watch Properties and then click to update the Select Properties Config specified in the Simulation Config.

    If there is no specified Select Properties Config as Watch Properties, a dialog is displayed prompting you to select an existing Select Properties Config. This selection will then overwrite the chosen Select Properties Config.




The Select Properties Config displays the added properties from the watch list.