Find_system is not searching under Lookinside subsytem reference in v2021a
12 views (last 30 days)
Show older comments
I have been tried with the below command
1)all_lookup_path = find_system(gcs,'LookInsideSubsystemReference','on','FollowLinks','on','SearchDepth','2','LookUnderMasks', 'all','LookUnderReadProtectedSubsystems','on', 'BlockType','Lookup_n-D');
2) all_lookup_path = find_system(gcs,'LookInsideSubsystemReference','on','FollowLinks','on','LookUnderMasks', 'all','LookUnderReadProtectedSubsystems','on', 'BlockType','Lookup_n-D');
In my model, the navigation to blocks are : Modelreference>subsystem>Librarylinks>masked subsytem
My goal is to collect the different block paths under subsystem refernce.
Kindly suggest me the suitable command line argument for that
Thanks in advance.
1 Comment
Sanman
on 27 Jan 2022
Hi Raju,
I'd like to understand the model hierarchy a bit more. As you mentioned the heirarchy seems to be Modelreference>subsystem>Librarylinks>masked subsytem.
Now, is the subsystem reference block one of the two subsystems you mentioned, or does in lie beneath the mask subsystem?
Answers (1)
Satwik
on 5 Apr 2024
Hello Raju,
I assume that the hierarchy of the model used is Subsystem Reference > Subsystem > LibraryLinks > Masked Subsystem and you are trying to get all the block paths under 'Subsystem Reference'. You may use the command-line code given below -
% Load the Simulink model into memory.
load_system('modelName');
% This function returns a cell array of block paths that match the criteria.
all_lookup_path = find_system('modelName/Subsystem Reference');
% 'all_lookup_path' now contains the paths to all the blocks that match the
% criteria.
For more details on the 'find_system' function in Simulink, you can refer to this documentation: https://www.mathworks.com/help/releases/R2021a/simulink/slref/find_system.html.
Hope this helps!
0 Comments
See Also
Categories
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!