How can I load bus objects in simulink base workspace?

14 次查看(过去 30 天)
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?

采纳的回答

Sudhakar Shinde
Sudhakar Shinde 2020-10-13
编辑:Sudhakar Shinde 2020-10-13
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')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by