Main Content

Domain-Specific Line Styles

For improved readability of block diagrams, each Simscape™ domain uses a distinct default color and line style for the connection lines. Physical signal lines also have a distinct style and color.

Domain-specific line styles apply to the block icons as well. If all the block ports belong to the same domain, then the whole block icon assumes the line style and color of that domain. If a block has multiple port types, such as the Rotational Electromechanical Converter, then relevant parts of the block icon assume domain-specific line styles and colors.

To view the line styles assigned to each domain, in the Simulink® Toolstrip, on the Debug tab, select Information Overlays > Simscape Legend. The Simscape Line Styles Legend window opens, listing the line color assigned to each registered domain, the domain name, and the domain path. If you click a domain path link, the Simscape file for the corresponding domain opens in MATLAB® Editor. For more information on domain paths and files, see Foundation Domain Types and Directory Structure.

Note

Besides Foundation domains, the Simscape Line Styles Legend window can also list custom domains present in your MATLAB session, such as Electrochemical or Position-Based Mechanical Translational.

To turn off domain-specific line styles for a particular model, in the Simulink Toolstrip, on the Debug tab, select Information Overlays > Simscape Domains. This action toggles the Simscape Domains button off, and the block diagram display changes to black connection lines and block icons, with physical ports visible at connection points. Repeatedly selecting the Simscape Domains button toggles the domain-specific line styles for this model on or off.

To turn off domain-specific line styles for all models, in the MATLAB Toolstrip, click Preferences. In the left pane of the Preferences dialog box, select Simscape, then clear the Enable domain styles for all models check box.