smbSysPortLineTable

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

SimMechanics returns the block and ports and line tables

Example Illustration

 missing image of smbSysPortLineTable(SName)

Syntax

bht=smbSysPortLineTable(SName)

Input Parameter

SName:

Output Parameter

bht:




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, smbSysPortLineTable, is designed to return a table of blocks and their port connections within a SimMechanics model. The function is authored by Tim Lueth and was created on November 11, 2016.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the input parameter SName is provided. If not, set SName to the current system using gcs.
  2. Use find_system to get all blocks in the specified system SName with a search depth of 1, meaning only top-level blocks are considered.
  3. Determine the number of blocks nb and initialize a cell array bht with nb rows and 6 columns.
  4. For each block, store the block name and its handle in the first two columns of bht.
  5. For each block (starting from the second block), retrieve the port handles using get_param and store the left and right connection handles in columns 3 and 4 of bht.
  6. Retrieve the port connectivity information and concatenate the port types into a string t.
  7. Determine the left and right port types by searching for '/L' and '/R' in the string t. Store these in columns 5 and 6 of bht.
Algorithm explaination created using ChatGPT on 2025-08-18 23:33. (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