Controlling Catia Parameter Decimal Places
Controlling Catia Parameter Decimal Places
(OP)
thread560-305431: Controlling Decimal Places Of A Parameter Value Through A Formula
Needed to reduce the significant decimal places on a fabrication drawing, while maintaining four-decimal accuracy in the design model.
Ref'd thread has some clues, but nothing explicit.
Fiddled around with functions and came up with this truncation method, which is simplified by defining intermediate string parameters:
2-D Cut Size Example:
---------------------
Screen.Height.String = ToString(`Screen.Height`).Extract(0,ToString(`Screen.Height`).Length()-5)
Screen.Width.String = ToString(`Screen.Width`).Extract(0,ToString(`Screen.Width`).Length()-5)
Nomenclature = "GRAINGER #49N599, CUT SIZE = " + `Screen.Height.String` + " X " + `Screen.Width.String`
Product Description = WIRE SCREEN #12 AWG 1X1 BLK PVC CTD
Assumes that 5 insignificant characters "000in" remain after rounding to 1 decimal place for each value.
May not solve everyone's problem, but hey it works for me!
Needed to reduce the significant decimal places on a fabrication drawing, while maintaining four-decimal accuracy in the design model.
Ref'd thread has some clues, but nothing explicit.
Fiddled around with functions and came up with this truncation method, which is simplified by defining intermediate string parameters:
2-D Cut Size Example:
---------------------
Screen.Height.String = ToString(`Screen.Height`).Extract(0,ToString(`Screen.Height`).Length()-5)
Screen.Width.String = ToString(`Screen.Width`).Extract(0,ToString(`Screen.Width`).Length()-5)
Nomenclature = "GRAINGER #49N599, CUT SIZE = " + `Screen.Height.String` + " X " + `Screen.Width.String`
Product Description = WIRE SCREEN #12 AWG 1X1 BLK PVC CTD
Assumes that 5 insignificant characters "000in" remain after rounding to 1 decimal place for each value.
May not solve everyone's problem, but hey it works for me!





RE: Controlling Catia Parameter Decimal Places
1D Cut Length Example:
-----------------------
Cut.Length.String = ToString(`PartBody\Cut.Length\FirstLimit\Length`).Extract(0,ToString(`PartBody\Cut.Length\FirstLimit\Length`).Search(".")+2)
Nomenclature: "BOSCH-REXROTH #8981992026, CUT LENGTH = " + `Cut.Length.String`
Product Description: T-SLOT ALUM PROFILE 45 X 45 X 6000mm
Note: Cut.Length is a pad