Syntax
SG=SGstampname(SG,[txtparams])
Input Parameter
SG : | | Solid Geometry |
txtparams : | | parameter to create a string such as in sprintftext |
Output Parameter
SG : | | SG including stampname and stampdate
|
Examples
SGstampname(SGbox,'SGbox([',[30 20 10],'])')
Copyright 2022-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, SGstampname
, is designed to add a stamp name and date to a Solid Geometry (SG) object. It is part of the SolidGeometry library and was introduced in version 5.2. The function is authored by Tim Lueth and is classified under auxiliary procedures.
Input Parameters
- SG: This is the Solid Geometry object that the function will modify by adding a stamp name and date.
- txtparams: This is a variable-length input argument that is used to create a string. It is similar to the input used in the
sprintftext
function.
Output Results
- SG: The function returns the modified Solid Geometry object, which now includes a
stampname
and a stampdate
.
Algorithm Steps
- The function begins by checking if the number of input arguments is less than 2. If so, it throws an error stating that an empty name is not allowed.
- It then calls the
sprintftext
function with the variable-length input arguments to generate a text string, ttxt
.
- If the generated text string
ttxt
is empty, the function throws an error indicating that an empty name is not allowed.
- The function assigns the generated text string
ttxt
to the stampname
property of the SG object.
- It assigns the current date and time, formatted as a string, to the
stampdate
property of the SG object using the datestr(now)
function.
- The modified SG object, now containing the
stampname
and stampdate
, is returned as the output.
Example Usage
An example of how to use the function is provided:
SGstampname(SGbox,'SGbox([',[30 20 10],'])')
This example demonstrates how to call the function with a Solid Geometry object SGbox
and a text parameter that includes dimensions.
Algorithm explaination created using ChatGPT on 2025-08-18 23:20. (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