File Exchange

image thumbnail

Add Simulink Blocks from a given Model File with context menu

version 1.0.0.0 (8.71 KB) by Paul
Customizes Simulink context menu with all blocks from a model file custom_context_menu_blocks.mdl.

1 Download

Updated 31 Jan 2011

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Customizes Simulink context menu with all blocks from a model file custom_context_menu_blocks.mdl.
These blocks are accessible through context menu: Add custom block / List of blocks. The chosen block is added at the position of the mouse click that initiated the context menu.

Please feel free to modify custom_context_menu_blocks.mdl to meet your expectations and needs.

It might be neccessary to run sl_refresh_customizations command to refresh Simulink context menu or set the Matlab path correctly.

Cite As

Paul (2021). Add Simulink Blocks from a given Model File with context menu (https://www.mathworks.com/matlabcentral/fileexchange/30248-add-simulink-blocks-from-a-given-model-file-with-context-menu), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Praveen Kumar

hai paul,
can you please tell how to use " schema.checked = 'checked' ", while using on/off button.
if i click the ON button it should be checked and OFF button must be unchecked and vice versa.
Please tell this answer as soon as possible.

Igor Braverman

As of R2012a there seems to be a little bug (typo)--> userdata became case sensitive or they have changed it on you.
old sl_customization reads:
----------------------------
66 customMDL = inArgs.Userdata{1};
67 blockName = inArgs.Userdata{2};
68 mousePosition = inArgs.Userdata{3};
---------------------------
need to read:
---------------------------
customMDL = inArgs.userdata{1};
blockName = inArgs.userdata{2};
mousePosition = inArgs.userdata{3};
---------------------------
Sincerely,
Igor

Lukas Lansky

Very useful.

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Acknowledgements

Inspired by: Create From Blocks

Community Treasure Hunt

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

Start Hunting!