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 22.214.171.124
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.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0Employees of the customers, together we are strong How to Get the Most from Your Signature in the CommunityNX Customization - Best Practice Guide
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 MP16/TC11.2I'd rather be e-steamed than e-diseaseled