smbPSLibname

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

returns the name a SimMultiBody Library Directory

Description

If called without an argument, it returns the Library path
If called with a function name, it returns the file name path
The directory is created in smbNewSystem.

See Also: smbNewSystem , smbWhich , smbFilename , smbPSLibCompile

Example Illustration

 missing image of smbPSLibname(FName)

Syntax

fn=smbPSLibname([FName])

Input Parameter

FName: smb_function name; default is

Output Parameter

fn: smb_function file name;default is directory name




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, smbPSLibname, is designed to return the name of a SimMultiBody Library Directory or a specific file path within that directory. It is part of the SimMechanics library and was created by Tim Lueth.

Input Parameters

Output

Algorithm Steps

  1. Initialize FName as an empty string.
  2. Check if there is at least one input argument and if the first argument is not empty. If so, assign the first argument to FName.
  3. Construct the file path using the smbFilename function and the FName variable. The path is formatted as '%s+mechPS_Tim_Lueth/%s', where the first placeholder is replaced by the result of smbFilename and the second by FName.
  4. If the operating system is Windows (checked using ispc), replace forward slashes with backslashes in the file path using strrep.

The function is part of a larger library and interacts with other functions such as smbNewSystem, smbWhich, smbFilename, and smbPSLibCompile.

Algorithm explaination created using ChatGPT on 2025-08-18 23:30. (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