Syntax
[Name,Blockpath,LibPath]=smbGetBlockInfo(Block)
Input Parameter
Block : | | Block Name; default is gcb |
Output Parameter
Name : | | Name of Block |
Blockpath : | | Part of Block |
LibPath : | | Library Path |
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, smbGetBlockInfo
, is designed to retrieve information about a Simulink or Simscape block. It is part of the SolidGeometry library, version 3.1, and was created by Tim Lueth in 2016.
Input Parameters
- Block: The name of the block for which information is to be retrieved. If no block is specified, the function defaults to using the current block (
gcb
).
Output Results
- Name: The name of the block, with newline characters replaced by spaces.
- Blockpath: The path of the block within the model, with newline characters replaced by spaces.
- LibPath: The library path of the block, with newline characters replaced by spaces.
Algorithm Steps
- Check if the
Block
parameter is provided. If not, set Block
to gcb
(get current block).
- Retrieve the block's name using
get_param(Block, 'Name')
and replace any newline characters with spaces.
- Get the block's capabilities using
get_param(Block, 'Capabilities')
.
- Extract the block path from the capabilities and replace newline characters with spaces.
- Extract the library path from the capabilities and replace newline characters with spaces.
- Retrieve the block type using
get_param(Block, 'BlockType')
.
- Additional parameters like line handles and link status are retrieved but not used in the output.
Algorithm explaination created using ChatGPT on 2025-08-18 23:42. (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