Scilab 6.0.2
- Scilab Help
- Xcos
- Scilab Utilities Functions
- %MODELICA_USER_LIBS
- block_parameter_error
- buildouttb
- getModelicaPath
- importXcosDiagram
- loadScicos
- loadXcosLibs
- scicosDiagramToScilab
- scicos_debug
- scicos_getvalue
- scicos_log
- standard_define
- standard_inputs
- standard_origin
- standard_outputs
- var2vec
- vec2var
- xcosAddToolsMenu
- xcosDiagramToScilab
- xcosPal
- xcosPalAdd
- xcosPalAddBlock
- xcosPalDelete
- xcosPalExport
- xcosPalGenerateAllIcons
- xcosPalMove
- xcosUpdateBlock
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
xcosAddToolsMenu
Add a menu item into the Xcos "Tools" menu.
Syntax
xcosAddToolsMenu(label, command)
Description
Add a menu into Xcos with a scilab command. The scilab command can assume that there is two variable on the current scilab context :
blk : The selected block. Variable does not exist if nothing is selected. The variable has a scicos_block type.
scs_m : The whole diagram. The variable has a scicos_diagram type.
This function has been introduced in Scilab 5.4.0.
xcosAddToolsMenu("print plop", "disp(''plop'')"); xcosAddToolsMenu("print selected block", "disp(blk)"); xcosAddToolsMenu("print diagram", "disp(scs_m)"); // define a custom update function function myUpdateFunction(blk, scs_m) execstr("[ok, blk] = " + blk.gui + "(''set'', blk);"); xcosUpdateBlock(blk); endfunction xcosAddToolsMenu("update block", "myUpdateFunction(blk, scs_m)");
See Also
Authors
Clément David - Scilab Enterprises
Report an issue | ||
<< vec2var | Scilab Utilities Functions | xcosDiagramToScilab >> |