Syntax
LL=smbGetAllLines(Block)
Input Parameter
Block : | | Block, Block list, System |
Output Parameter
LL : | | List of connections (n x 4) |
Copyright 2016-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, smbGetAllLines
, is designed to retrieve a list of connections between blocks and ports in a Simulink model. It is part of the SolidGeometry library and was introduced in version 3.0.
Input Parameters
- Block: This can be a single block, a list of blocks, or a system within a Simulink model. If no input is provided, the function defaults to the current system using
gcs
(get current system).
Output Results
- LL: A list of connections, formatted as an
n x 4
cell array. Each row represents a connection with the following columns:
- Source Block Name
- Source Port
- Destination Block Name
- Destination Port
Algorithm Steps
- Check if the
Block
parameter is provided. If not, set Block
to the current system using gcs
.
- Initialize a cell array
LL
with dimensions 1000 x 4
to store connection data, and a counter nc
to track the number of connections.
- Retrieve the lines associated with the specified
Block
using get_param(Block, 'Lines')
.
- Iterate over each line:
- Increment the connection counter
nc
.
- Store the full name of the source block, source port, destination block, and destination port in the
LL
array.
- After processing all lines, trim the
LL
array to the number of connections found. If no connections are found, return an empty array.
Algorithm explaination created using ChatGPT on 2025-08-19 01:04. (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