by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.3, Creation date: 2017-01-08, Last change: 2025-09-14
See Also: smbshow
, smbGetSubSystempath
, smbDrawNow
smbshow([block])
block: | block handle';default is gcb |
This function, smbshow, is designed to display the system or subsystem diagram of a specified block in Simulink. It is part of the SG-Library and was created by Tim Lueth on January 8, 2017.
gcb (get current block).The function begins by setting the variable block to the current block using gcb. It then checks if there are any input arguments provided (nargin>=1) and if the first argument is not empty (~isempty(varargin{1})). If both conditions are true, it assigns the first input argument to block.
Next, the function calls open_system with two arguments: the path to the subsystem obtained from smbGetSubSystempath(block) and the option 'tab'. This opens the specified system or subsystem diagram in a new tab within the Simulink environment.