Count all blocks used inside a model & save to excel sheet

Counts all blocks- including ref models, individual blocks, their instances
213 Downloads
Updated 3 Feb 2014

View License

This is a simple script which counts each and every blocks from root to all reference model levels and lists all blocks used, along with instances.

How to use :
If your model file is : SchedulerRoot.mdl

This is how the script should be called.

Count_Blocks_("SchedulerRoot")

Note :

The models on which this script runs has to be error free and
on MATLAB path.

Let me know if any issues and contribute to improve if needed.

Regards
Prashanth K B

Cite As

Prashanth Kalaghatta (2024). Count all blocks used inside a model & save to excel sheet (https://www.mathworks.com/matlabcentral/fileexchange/45379-count-all-blocks-used-inside-a-model-save-to-excel-sheet), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Programmatic Model Editing in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0