Main Content

slEditToolstripAction

Open file that defines custom Simulink Toolstrip action

Description

example

slEditToolstripAction(action) opens the file that defines the specified custom toolstrip action.

Examples

collapse all

Suppose you have many JSON files that define actions for a custom tab in a toolstrip component named custom.

To open the file that defines a custom action, such as myAction, use the slEditToolstripAction function.

slEditToolstripAction("custom:myAction")

Input Arguments

collapse all

Fully qualified action name, specified as a character vector or string scalar. The fully qualified name is the name of the toolstrip component followed by a colon and the full path to the action within the toolstrip component.

When an action is defined at the top level of a toolstrip component, the fully qualified action name consists of these parts:

  1. Name of the toolstrip component followed by a colon

  2. Action ID

When an action is defined in the JSON object for a control, the action does not use an action ID. The fully qualified action name consists of these parts:

  1. Name of the toolstrip component followed by a colon

  2. Tab ID followed by a forward slash

  3. Section ID or index followed by a forward slash

  4. Column ID or index followed by a forward slash

  5. Control ID or index

Example: slEditToolstripAction("custom:myAction") opens the file that defines myAction for the custom toolstrip component.

Example: slEditToolstripAction("custom:customTab/2/1/3") opens the file that defines the action for the third control in the first column of the second section on the tab named customTab in the custom toolstrip component.

Data Types: char | string

Introduced in R2021b