Cancel
Showing results for 
Search instead for 
Did you mean: 

How to control the decimal places for $mom_tool_diameter in postbuilder

Genius
Genius

Hello

I used Text Element block to output tool info

3.JPG

current output like this:

N8 T63 M06 (8.8MM_CRB_DRILL -- 8.8000000000000007)

 

I want it like this

N8 T63 M06 (8.8MM_CRB_DRILL -- 8.80)

 

Thanks very much

1 REPLY 1

Re: How to control the decimal places for $mom_tool_diameter in postbuilder

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Place a custom command before the block to create a formatted output string and use that formatted string in your block.

set my_tool_description [format "($mom_tool_name -- %.2f)" $mom_tool_diameter]

Hope this helps.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.2, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0

Employees of the customers, together we are strong Smiley Wink
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide

Learn online





Solution Information