Is it possible to force Simulink to search for library blocks outside of the MATLAB path?

1 view (last 30 days)
I have a system which takes a library block or model reference block, copies it, modifies it, and places it in a new folder which is guaranteed to be higher on the MATLAB path. This manipulation of the path search process allows for augmentation of a library without actually affecting the original file, which is key for file integrity and file touch detection algorithms.
After the simulation is run these temporary copies are deleted and the folder they were in is removed from the path again. This works fine as long as for every preparation a corresponding clean up is run.
It would be nice to be able to add a temporary virtual path on top of the MATLAB path for a given run of a model. This is similar to the slprj folders auto generated by Simulink but instead of .c source files and object files simulink model files are used.
Thanks,

Accepted Answer

Sriram Narayanan
Sriram Narayanan on 4 May 2015
Edited: Sriram Narayanan on 4 May 2015
I understand that you would like to see an option to add a temporary virtual path on top of the MATLAB path that will contain copies of the Simulink libraries and files that you are working on so that the original files are not affected. This is a very specific use case and Simulink does not have the capability to do this. Simulink can only reference files that are on the MATLAB Path.
I have notified the development team about this limitation here at MathWorks and they are looking into adding this functionality in a future release.

More Answers (0)

Categories

Find more on Interactive Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!