Find_system is not searching under Lookinside subsytem reference in v2021a

8 ビュー (過去 30 日間)
Raju Kata
Raju Kata 2021 年 12 月 2 日
回答済み: Satwik 2024 年 4 月 5 日
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
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
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!

カテゴリ

Help Center および File ExchangeSubsystems についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by