How do I search for library links in my model from the command line in Simulink 7.4 (R2009b)?

A
adekar · Sep 6, 2021 · 2.3K views
Question
In Model Explorer I have an option to search for library links in my model. I would like to know how I can achieve the same using the command line tools.  
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 30, 2026
In order to obtain a list of blocks that are library links you will have to find all blocks in your model that have their 'LinkStatus' property not set to 'none'. One way to achieve this would be to use the FIND_SYSTEM command with a regular expression that excludes all results that are equal to 'none':
 
 
libraryLinks = find_system(gcs, 'regexp', 'on', 'linkstatus', '^((?!none).)*$')
You may want to use the 'LookUnderMasks' option of FIND_SYSTEM as well to find the blocks under masks as well.
 
Alternatively you could use several FIND_SYSTEM calls to find all blocks with another status and combine the results.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!