version 1.9.0 (212 KB) by Robert Rasche
easy-as-pie API to Simulink


Updated Tue, 10 Aug 2021 18:32:12 +0000

From GitHub

View License on GitHub

Editor's Note: This file was selected as MATLAB Central Pick of the Week

easy-as-pie API for Simulink models
slQuery is a "slickness-layer" ontop of the `find_system` and `get/set_param` API-functions and various related features of Simulink. It resulted from several inconveniences i had to deal with, while writing scripts that interact with and modify model structures.
Scripted manipulation of Simulink models had always required tons and tons of API-calls, awkward management of block handles vs. pathes, loops and subroutines for dealing with ports/lines or mux-/bus-signals. Dealing with Subsystem levels. In all this code, the main idea of what is being done cannot stand out clearly.
slQuery brings you two major tools that make scripted interaction with models a lot easier and cleaner.
1) slQuery is a query-language inspired by CSS/jQuery, XPath and regex that allows searching a loaded Simulink model for groups of blocks (called "situational patterns") that satisfy certain conditions and have certain relations to each other.
2) slQuery wraps arrays of Simulink block handles into lightweight "objects" that can be used to access block parameters and structural features in a syntactically pleasing way.

Cite As

Robert Rasche (2022). slQuery (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.