sprintftext

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Text/Strs/Chars/Links
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-14, Last change: 2025-09-15

creates as simple as possible a string for design parameters

Description

Originally written for SGpartslist but extremely helpful also for SGofCPLcommand

See Also: SGpartslist , SGofCPLcommand , SGpartsfuncparams , SGwriteMultipleSTL

Example Illustration

 missing image of sprintftext(textelementlist)

Syntax

txt=sprintftext([textelementlist])

Input Parameter

textelementlist: list of numbers, chars, and textlines

Output Parameter

txt: string to bu used for fprintf or SGpartslist

Examples


d=4; l=5; cmd=sprintftext('c ',d,', h ',l), SGofCPLcommand(cmd)
sprintftext(1,' DIN7991 Screw ',2.5,'x',6,'mm')

%% FULL CONCEPT USE
AParts=SGpartslist({},SGpartsfuncparams(1,2,3)); % Creates Partslist
for i=1:size(TL,3);
AParts=SGpartslist(AParts,sprintftext(1,'DIN7991 M',MM(1),'x',MM(2),'mm'));
end
[~,partext]=SGpartslist(AParts); SGwriteMultipleSTL({SGW},'','',partext);




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

Last html export of this page out of FM database by TL: 2025-09-21