Created
April 7, 2023 18:23
-
-
Save luisdamed/5a1c62ce0fe25426d53e3fe506941975 to your computer and use it in GitHub Desktop.
Create custom command for Simulink, allowing you to call addblocks.m from the Toolbox or using a combination of keys. See the explanation: https://www.makerluis.com/3-keyboard-macros-to-speed-up-your-simulink-workflow/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sl_customization(cm) | |
cm.addCustomMenuFcn('Simulink:ToolsMenu', @getMyMenuItems); | |
end | |
function schemaFcns = getMyMenuItems(~) | |
schemaFcns = {@autoAddBlocks}; | |
end | |
function schema = autoAddBlocks(~) | |
schema = sl_action_schema; | |
schema.label = 'Batch Add Blocks'; | |
schema.statustip = 'Batch Add Blocks'; | |
schema.accelerator = 'Ctrl+Shift+w'; | |
schema.callback = @autoAddBlocksCS; | |
end | |
function autoAddBlocksCS (~) | |
addblocks | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment