![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/378831/image.png)
How can I load bus objects in simulink base workspace?
16 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ayman Ahmad
il 13 Ott 2020
Modificato: Sudhakar Shinde
il 13 Ott 2020
I am using several bus objects as a data type in a library subsystem and I want them to load automatically when I insert the block. Currently, I have to manually import the saved bus objects into the base workspace each time I use the block. Is there a way to automate this process?
0 Commenti
Risposta accettata
Sudhakar Shinde
il 13 Ott 2020
Modificato: Sudhakar Shinde
il 13 Ott 2020
Eg. If you have bus objects now in 'Dictionary.m' file, You can use 'PreaLoadFcn' function or 'PostLoadFcn' to load bus objects into base workspace.
you can add in PreaLoadFcn or PostLoadFcn function:
open model explorer and use option as below snap:
run( 'Dictionary.m')
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/378831/image.png)
0 Commenti
Più risposte (0)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!