Dymola conversion script, run script manually
Asked Answered
H

1

1

I have a library without annotation (uses(Modelica(version="X.Y.Z"))); in the top level package.mo file. Can I manually execute the conversion script to update my library? And where is it located? I am using Dymola.

Heartthrob answered 8/3, 2020 at 20:3 Comment(0)
T
5

Conversion scripts are usually located in the Resources folder of a library.

E.g. for the MSL 3.2.3 shipped wit Dymola 2020x, you can find them here:

C:\Program Files\Dymola 2020x\Modelica\Library\Modelica 3.2.3\Resources\Scripts\Dymola

To manually apply a conversion:

  1. Open a fresh Dymola window
  2. Run the conversion script
    • via the GUI with Run Script in the Simulation tab
    • or from the command line with RunScript("path/to/conversion.mos")
  3. Open the library to convert
  4. Dymola will directly apply the conversions and you will not see the usual conversion dialog. Check the log window to see what was converted.
Tipstaff answered 9/3, 2020 at 7:2 Comment(2)
Thanks. That directory has three scripts on my computer: _from_1.6_to_2.1, _from_2.1Beta_to_2.1 and _from_2.2.2_to_3.0. But it seems there is no script _from_3.2.2_to_3.2.3 !?Heartthrob
There is no conversion needed from 3.2.2 to 3.2.3. If you check the conversion section in the model annotation of the Modelica library, you can see that this is the case for multiple version: conversion(noneFromVersion="3.2.2", noneFromVersion="3.2.1", ...Tipstaff

© 2022 - 2024 — McMap. All rights reserved.