Guy on Simulink

Simulink & Model-Based Design

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Predictive Quick Insert 2

Posted by Guy Rouleau,

Sometimes, I hear about a plan for a new feature without immediately realizing its impact... but it ends up fundamentally changing the way I use Simulink. Quick Block Insert is one such feature.

If you are not sure what I am talking about, Quick Block Insert is this feature that allows you to double-click in the canvas background and type block names to insert them. It is significantly faster than dragging blocks from the Simulink Library Browser.

Quick Insert

Today I want to highlight a new R2018b feature that improves the Quick Block Insert even more.

Quick Insert Suggestions Based on Context

In R2018b, when you drag a line from a block, you can double-click on the end of the line and the Quick Insert prompt will appear with a suggestion of blocks. Had you noticed this?

Quick Insert from signal

Depending on which block and port you are dragging from, the blocks proposed in the default list will be different. For example, if you pick a math block like the Gain block, we will propose other types of math blocks. For a Bus Creator, we will propose blocks more likely to be connected to a bus signal.

Quick Insert from signal

Simscape Domains

One context in which this feature is especially useful is with Simscape. The Quick Insert feature offers blocks specific to the domain of the port you are starting with. A mechanical translational port will offer mechanical translational blocks, while a hydraulic port will offer hydraulic blocks.

Quick Insert from Simscape Connections

I find that, when compared to launching the Quick Insert prompt from the canvas background, launching the Quick Insert prompt from a connection significantly reduces the number of characters I need to type to get the block I want.

Improve Quick Insert Results

Also starting in R2018b, the Quick Insert algorithm learns as you are using it. The blocks you are using the most in specific contexts will become the ones offered first after some time.

If you want to speed up the learning process, you can train the algorithm with existing models.

Functions slblocksearchdb.trainfrommodel or slblocksearchdb.trainfrommodelsindir, allow you to train the algorithm using a single model, or all the models in a specific directory. The more models you feed it, the more it will improve!

Now it's your turn

Are you taking advantage of the Quick Insert from a line in R2018b? Let us know what you think of this enhancement in the comments below.

2 CommentsOldest to Newest

Matt replied on : 1 of 2
I loved this feature in 2018a, however, upon installing 2018b Quick Block Insert is disabled by default for me for some reason. Any idea where in the menu I am able to enable it?
@Matt: I am not sure what could cause the quick insert to be disabled on your system. If you go to the Simulink preferences, in the Editor section, there is an option "Enable smart editing features". Make sure it is enabled. If it is enabled and the quick insert prompt still does not show up, please contact technical support.

Add A Comment

Your email address will not be published. Required fields are marked *

Preview: hide