Find_system is not searching under Lookinside subsytem reference in v2021a
12 次查看(过去 30 天)
显示 更早的评论
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 个评论
Sanman
2022-1-27
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?
回答(1 个)
Satwik
2024-4-5
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subsystems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!