The parametric evaluator only evaluates expressions that are written in the syntax it supports. By default, the parametric evaluator uses the built-in math to solve expressions. The built-in math uses a syntax that is similar to the Octave syntax (see Built-in Math for more information about built-in math). You can also write an expression using a scripting language that is supported by MagicDraw. 

You can specify a scripting language to evaluate an expression through the Specification dialog of the opaque expression, which is the specification of the constraint. 

To specify the language to evaluate an expression in the Specification dialog 


  1. Right-click an opaque expression in the Containment tree and select Specification. The Specification dialog of the opaque expression will open (see the following figure).

    Selecting the Language of the Opaque Expression in the Specification Dialog

  2. Click the row next to the Language option to open the text box and enter the name of the language you want.
  3. Click Close to close the dialog. 

You can also select the language for constraints on a SysML constraint block through the context menu on the constraint block or a constraint property typed by the constraint block (see the following figure). 

To select the language for the constraint of a SysML constraint block 


  1. Right-click a SysML constraint block or a constraint property typed by the constraint block on the diagram.
  2. Click Language and select any supported language to evaluate constraint blocks from the list. 

    Selecting the Language for Expressions in the Context Menu

The language of the Default Parametric Evaluator in Magic Model Analyst is Built-in Math. Therefore, it will use Built-in Math to evaluate an opaque expression whose language is not specified. You can see the Default Parametric Evaluator language option in the Parametric Evaluator group in the Project Options dialog. 

The Default Parametric Evaluator option in the Parametric Evaluator group in the Project Options dialog.

You can also specify the duration you want to wait for the parametric evaluator to evaluate an expression. The timeout value is specified in second. If, for example, the timeout value is 15, the parametric evaluator has 15 seconds to evaluate a given expression. If it cannot give you the result within 15 seconds, it will stop evaluating the expression.