Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Determine Units inside a rule

Status
Not open for further replies.

morauski

Automotive
Dec 21, 2008
20
0
0
US
been working with catia about six months. just getting started into creating rules and i have a need to know what the current units are within the rule. is there a way to find out what the current units (mm or in) is? I need to format a catalog value with only mm values
 
Replies continue below

Recommended for you

If I recollect right, if you don't have a unit to numerical value it will be counted in meters and parameters of length, angle.. type will be according to setting
 
it is from the kwa side of things.

if the user's units for length is set to mm then all is well; if they select dia= change it then the current rule looks at the value converts it to a string and changes the catalog entry from say D40 L300 to D30 L300 but if it is set to inches then it ends up looking like D1 L300

I haven't found the functions/procedures or whatever you call them in Catia

i would think that something like IsMetric() would exist but don't know where to really look

 
After experimenting with the string options it turns out that when you convert a parameter to a string it also includes the units. so i was able to check the string for the units and then format the required string based on the test.

However, if there is an easier way i would still like to know about it.
 
Status
Not open for further replies.
Back
Top