Hello Post Experts.
I'd like to limit the number of characters of an output literal statment. In my post I am using the following:
I'd like to limit the number of charaters in the"$mom_group_name" to 5 alpha nummeric characters. So even if my group name in NX is O2222-modified, I only want to output O2222
Using NX9 and PB 220.127.116.11
Go to Solution.
MOM_output_literal [format "%.5s" $mom_group_name]
The above should truncate the output to five characters from the left.
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1Development: VB.NET, Tcl/Tk Testing: NX12.0 Preparing: NX12.0Employees of the customers, together we are strong How to Get the Most from Your Signature in the Community
Maybe something like this:
set out_string [string range $mom_group_name 0 4]
You could also be more intelligent about it (checking for spaces/underscores, make sure it starts with the letter O followed by digits, etc.)
Production: NX10.0.3.5 MP5 + patch/TC11.2Apparently I've turned into a gearhead