Syntax
bn=smbPSBlockname(block)
Input Parameter
Output Parameter
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, smbPSBlockname
, is designed to return the name of a block relative to a library in the SG-Library. It was created by Tim Lueth and is part of the SIMMECHANICS class.
Input Parameters
- block: A string that describes the block. This is an optional parameter, and if not provided, it defaults to an empty string.
Output Results
- bn: The path of the block within the library.
Algorithm Steps
- Initialize the variable
block
as an empty string.
- Check if there is at least one input argument and if the first argument is not empty. If so, assign this argument to
block
.
- Call the function
smbPSLibname
to get the library path and store it in variable a
.
- Use the
strfind
function to locate the position of the character '+' in the string a
and store the result in b
.
- Extract the substring from
a
starting from the position after '+' to the second last character and store it in bn
.
- Concatenate
bn
with the string '_lib/'
and the block
variable to form the final block path.
Algorithm explaination created using ChatGPT on 2025-08-18 23:15. (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