WOLFRAM SYSTEMMODELER LINK PACKAGE SYMBOL

WSMConnectComponentsString

WSMConnectComponentsString["newmodel",{"c1""comp1",},{"c1.a"->"c2.b",}]
creates a string with the Modelica model "newmodel" by connecting connector a of component c1 with connector b of component c2 etc.

DetailsDetails

  • WSMConnectComponentsString takes the same arguments and options as WSMConnectComponents.
  • Instead of committing newmodel to the SystemModeler kernel, WSMConnectComponentsString returns a Modelica string representation.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Create a model string for a simple electrical circuit:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=