MagicDraw SysML/Cameo: SysPhS: Export to Modelica: It does not seem to matter whether you give the language of Constraints as 'Modelica' or 'sysphs' (although SysPhS specifies a restricted SysPhS expression grammar)

Icon class
far fa-sticky-note
far fa-sticky-note
Note kind
Policy level
Specification keywords
If you have the MagicDraw SysML Plugin or Magic Model Analyst® (Cameo Simulation Toolkit®) 19SP3, under the folder .../sample/Simulink and Modelica Transformation you'll find these small sample projects:


If you look under any Constraint owned by a ConstraintBlock in those samples you'll find the language is set to 'sysphs'. It's not at all clear how one can add that language so it's available project-wide, there is however a forum tip about Adding to list of allowed Constraint Specification Languages:

Since 19.0 version of MagicDraw, you can extend the list of languages by using Opaque Expression Default Language property of the Environment options. You can simply add your needed languages by typing in the value field of property. As a result, the opaque expression language of created constraint is defined as specified in the Opaque Expression Default Language.

It will then be available under the language pulldown menu for any Constraint (rather than having to type it in each time).

Although SysPhS-1.1 specifies a SysPhS expression grammar that is essentially a restricted subset of Modelica (see 8 Language for Mathematical Expressions) the above-mentioned tools do not seem to care, so you can just as easily set the Constraint language to Modelica and enjoy some syntax highlighting and language validation.

Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)
External links