Main Content

Utilities

Advanced functions for manipulating and querying models, charts, and elements directly

These utility functions enable advanced users to manipulate and query Simulink models and Stateflow charts and elements of those models and charts.

Functions

expand all

slreportgen.utils.sortSystemsSort Simulink and Stateflow systems (Since R2022b)
slreportgen.utils.sortObjectsSort Simulink and Stateflow objects (Since R2022b)
slreportgen.utils.sortBlocksSort Simulink and Stateflow blocks (Since R2022b)
slreportgen.utils.hasDiagramCheck if object has diagram (Since R2020b)
slreportgen.utils.isBusSelector Check if Bus Selector block
slreportgen.utils.isDocBlock Check if DocBlock
slreportgen.utils.isLookupTable Check if lookup table block
slreportgen.utils.isMATLABFunction Check if MATLAB function block or object
slreportgen.utils.isModelCheck if object is model (Since R2020b)
slreportgen.utils.isModelReferenceBlockCheck if object is Model block
slreportgen.utils.isStateTransitionTableCheck if object is state transition table (Since R2022a)
slreportgen.utils.isStateTransitionTableBlock Check if object is Transition Table block
slreportgen.utils.isTestSequenceCheck if Test Sequence block or object
slreportgen.utils.isTruthTable Check if object is Truth Table
slreportgen.utils.isModelLoaded Check if model is loaded
slreportgen.utils.loadAllSystems Load all systems
slreportgen.utils.getModelHandleGet Simulink model
slreportgen.utils.getSlSfHandleGet Simulink handle or Stateflow object
slreportgen.utils.block2chartGet Stateflow chart object from containing block
slreportgen.utils.getObjectID Generate link target ID for Simulink or Stateflow object
slreportgen.utils.isSID Check if name is Simulink Identifier (SID) string
slreportgen.utils.isValidSlSystem Check if system is valid Simulink system
slreportgen.utils.pathJoin Combine two diagram path parts
slreportgen.utils.pathParts Split diagram path into parent and diagram parts
slreportgen.utils.pathSplit Split diagram path into array of diagram parts
slreportgen.utils.getCurrentEditorViewGet current editor view area (Since R2020a)
slreportgen.utils.getDisplayIcon Get Simulink or Stateflow icon file name
slreportgen.utils.HierarchyNumberGenerate number that represents subsystem position in model hierarchy (Since R2021b)
slreportgen.utils.traceSignal Trace signal to source or destination
slreportgen.utils.getResolvedParamValue Evaluate parameter value expression
slreportgen.utils.isMaskedSystemCheck if system is masked subsystem block
slreportgen.utils.isCommentedCheck if object is commented out