1

Is there are way to make a user written class read-only in dymola? I want to avoid modifying it by error, when working on models that use it.

user3751857
  • 91
  • 1
  • 5

2 Answers2

0

There are two ways I know of. The first is to make the files read only on the file system. I'm pretty sure Dymola will recognize that fact and prevent modification. I think.

There is also a way to add an annotation that is essentially a checksum or hash or something. But this is typically done by DS as a way of "signing" libraries. I don't think there is a way for ordinary users to perform this signing.

Have you check in the documentation? It might be documented there. I don't have access to a machine with Dymola on it right now to check.

Michael Tiller
  • 9,291
  • 3
  • 26
  • 41
0

Since Dymola 2017 FD01 classes can be locked.

  • Right-Click a class in the package browser and select Lock...

  • This will create the annotation

    __Dymola_LockedEditing="<reason-for-locking>"
    

    and the class and nested classes (e.g. classes in a package) are not editable anymore.

marco
  • 5,944
  • 10
  • 22