Syntax
smbNewLineRouting([asys])
Input Parameter
asys : | | system; default is gcs |
Copyright 2017-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, smbNewLineRouting
, is designed to reroute lines in a Simulink model. It is part of the SG-Library and was created by Tim Lueth in January 2017. The function primarily operates on the current system or a specified system to optimize the routing of lines.
Input Parameters
- asys: This parameter represents the system on which the function operates. If not provided, the default is the current system, obtained using
gcs
(get current system).
Algorithm Steps
- The function begins by setting the variable
asys
to the current system using gcs
. If an argument is provided and it is not empty, asys
is set to this argument.
- It calls the function
smbDeleteUnconnectedLines
with asys
as the argument. This function likely removes any lines in the system that are not connected to blocks.
- The function retrieves all lines in the system
asys
using get_param(asys, 'Lines')
. This returns a structure array p
containing information about each line.
- For each line in the array
p
, the function updates the line's routing points. It does this by calling PLroutefind
on the current points of the line and setting the line's points to the result. This step optimizes the routing of each line.
Algorithm explaination created using ChatGPT on 2025-08-18 21:59. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21