Borrar filtros
Borrar filtros

Change Simulink Library Lock Status from within the Library?

1 visualización (últimos 30 días)
Hans Esders
Hans Esders el 23 de En. de 2019
Respondida: Hans Esders el 23 de En. de 2019
Hi,
I understand, I can change the library status of a Simulink library programmatically.
My question is: can I do that from within the library as well?
Background: users can download the library together with some other files (including documentation PDFs) from a repository. I would like to do automate some initial settings (e.g. links to PDFs) when the user opens the library for the first time after download.

Respuestas (3)

Fangjun Jiang
Fangjun Jiang el 23 de En. de 2019
Open your library model, in menu File, library properties, library properties,
In the Callbacks panel, you could add a callback to the PreLoadFcn or PostLoadFcn, "winopen('abc.pdf')".
Note the file will be open every time the library is loaded.

Hans Esders
Hans Esders el 23 de En. de 2019
Unfortunately this does not help. There is a different PDF for each of the blocks in the library. These PDFs are located in folders which are not on the Matlab path.
Furthermore, the link to these PDFs is supposed to work even after the user has copied one of the library blocks into another model.

Hans Esders
Hans Esders el 23 de En. de 2019
My question was (and stil is): Can I change the library lock status of a Simulink library programmatically from within the library? There is nothing to be corrected here.

Categorías

Más información sobre Event Functions en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by