WSMLink`
WSMLink`

WSMConnectComponents

WSMConnectComponentsString is being phased out in favor of ConnectSystemModelComponents, which was introduced experimentally in Version 11.3.

WSMConnectComponents["newmodel",{"c1""comp1",},{"c1.a"->"c2.b",}]

creates the Modelica model "newmodel" by connecting connector a of component c1 with connector b of component c2 etc.

Details

  • WSMConnectComponents[newmodel,] returns WSMModelData[newmodel].
  • WSMConnectComponents["PackageA.NewModel",] inserts "NewModel" into "PackageA".
  • The shortest unique component name comp can be used where WSMNames["*.comp"] gives a unique match.

Examples

open allclose all

Basic Examples  (3)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Create a simple electrical circuit:

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

Show the current and voltage in the inductor:

In[4]:=
Click for copyable input
Out[4]=

Use short naming to refer to the Abs and Sine components in Modelica.Blocks:

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

Scope  (4)

Generalizations & Extensions  (2)

Applications  (3)

Properties & Relations  (4)

Neat Examples  (1)

See Also

WSMCreateModel  WSMModelData