# Is it possible to use SystemModeler as a Modelica IDE (to create custom Modelica components)?

Wolfram's SystemModeler provides access to a large amount of components from the standard Modelica language, as is mentioned on this page. It can also be extended with Modelica libraries built by third parties, such as those listed here).

I wanted to ask about creating custom components using Modelica and importing these to SystemModeler.

Question:

Does SystemModeler provide a means to code in Modelica directly, or do custom components have to be created outside of SystemModeler?

## 3 Answers

SystemModeler does support creating and editing custom components, with tools for both writing directly in Modelica, as well as extensive graphical tools to create, edit and explore hierarchies and components.

To add to that, you can also use CreateSystemModel and ConnectSystemModelComponents in Mathematica (from 11.3) to create models from Wolfram Language.

Additionally, if you want to write text-based Modelica directly, you can use ImportString["modelica code here", "MO"] to create (or update) models from Wolfram Language.

I think that writing Modelica code and generating Modelica models is the basic and main purpose of SystemModeler, so yes, that is possible and it also provides support of building systems from building blocks graphically.

The problem is rather the opposite: every implementation of the Modelica language has developed its own peculiarities and extensions, so unless the author(s) have taken care to stick to the standard it not always is possible or trivial to transfer Modelica models optimized for one implementation to another. What any of the available implementations do support is the standard modelica library, AFAIK. You should check which version of Modelica the different environments do support, though.

• I think calling the different tool implementations of Modelica "dialects" is a bit harsh. The general statement that there are many Modelica models out there not following the standard but still happening to work in one tool is certainly true though. – Malte Lenz Mar 20 '18 at 8:47
• @MalteLenz: do you like that formulation better? I did not even realize that the former formulation could be considered "harsh" :-). I think if you take the point of view of a user the difference between a dialect and the possibility to use non-standard extensions in (almost?) every implementation is not as relevant as for someone who needs to convince a community that there is a standard and that it mostly is observed by the implementations... – Albert Retey Mar 20 '18 at 14:23
• I understand the frustration users can encounter with non-standard models. In my mind a "dialect" is a stronger and more targeted diversion from a standard than what we are seeing in the Modelica world. It's mostly nitpicking though, I agree with your answer in general. – Malte Lenz Mar 20 '18 at 14:35

Yes you can write in "pure" Modelica by switching to the Modelica Text View.