Block Callbacks

Create Block Callbacks

You can create block callbacks interactively or programmatically.

To create block callbacks interactively:

  1. Right-click a block, and in the context menu, select Properties.

  2. In the Block Properties dialog box, select the Callback tab.

  3. Create the callback code.

To create a block callback programmatically, use the set_param command to assign MATLAB® code to the block callback parameter.

For more information, see Block Callback Parameters.

Block Callback Parameters

If a block callback executes before or after a modeling action takes place, that callback occurs immediately before or after the action.

 Block Opening Callback Parameters

 Block Editing Callback Parameters

 Block Compilation and Simulation Callback Parameters

 Block Saving and Closing Callback Parameters

 Subsystem Block Callback Parameters

Related Examples

Was this topic helpful?