smbGetAllLines

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.0, Creation date: 2016-11-15, Last change: 2025-09-14

returns a connecting list of Blocks an Port



See Also: smbAddLine

Example Illustration

 missing image of smbGetAllLines(Block)

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

Output Results

Algorithm Steps

  1. Check if the Block parameter is provided. If not, set Block to the current system using gcs.
  2. Initialize a cell array LL with dimensions 1000 x 4 to store connection data, and a counter nc to track the number of connections.
  3. Retrieve the lines associated with the specified Block using get_param(Block, 'Lines').
  4. 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.
  5. 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