Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations LittleInch on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling Catia Parameter Decimal Places

Status
Not open for further replies.

bwnichols

Electrical
Joined
Dec 30, 2002
Messages
2
Location
US
thread560-305431

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!
 
Improvement: Instead of lopping off the last 5 characters, more generally index decimal point and extract index+2 chars from start of string

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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top