WSMLink`
WSMLink`

WSMRenameModel

WSMRenameModel is being phased out in favor of SystemModel, which was introduced experimentally in Version 11.3.

WSMRenameModel["source","dest"]

renames the model source to dest.

Details and Options

  • Both source and dest refer to the fully qualified Modelica names.
  • Names can be given as strings or as DotName.
  • WSMRenameModel returns WSMModelData["dest"] if it succeeds, and $Failed if it fails.
  • The shortest unique model name source can be used where WSMNames["*.source"] gives a unique match.

Examples

open allclose all

Basic Examples  (3)

Load Wolfram System Modeler Link:

Copy a model from the DocumentationExamples library to a new place:

Rename the new model:

Clean up by deleting the new model:

Copy a package to a new place:

Rename a model inside the package:

Clean up by deleting the new package:

Options  (1)

OverwriteTarget  (1)

Copy a package to work with:

By default, renaming to an existing model fails:

Use OverwriteTarget to overwrite the existing target model:

Clean up the created package:

Possible Issues  (1)

Renaming does not move models between packages:

Models can be copied anywhere:

Clean up the created packages and models: