OBSOLETE WOLFRAM SYSTEMMODELER LINK PACKAGE SYMBOL

WSMCopyClass

WSMCopyClass has been replaced by WSMCopyModel.

WSMCopyClass["source.name"]
creates a copy of the model source.name with the name name.

WSMCopyClass["source","dest"]
creates a copy of the model source with the name dest.

DetailsDetails

  • Both source and dest refer to the fully qualified Modelica names.
  • Names can be given as strings or as DotName.
  • If dest already exists, it can be overwritten with the option "OverwriteTarget"->True.
  • If the parent of dest does not exist, it is created automatically.
  • WSMCopyClass returns WSMModelData[dest], or $Failed if it cannot create the copy.
  • The shortest unique model name source can be used where WSMNames["*.source"] gives a unique match.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Load Wolfram SystemModeler Link:

In[1]:=
Click for copyable input

Copy a class from the MathematicaExamples library to a new place:

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

Give a new name to the copied class:

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

Make a copy of a package:

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